Radio is the single control; RadioGroup manages a set and calls onChange with the chosen value.

Goggles size

Props

Radio

  • labelReactNode

    Label text.

  • disabledboolean
    Default: false

    Disable the control.

  • classNamestring
    Default: ''

    Extra classes for the root element.

  • ...input props

    name, value, checked, onChange and the rest go to the <input>.

RadioGroup

  • labelstring

    Group legend.

  • namestring

    Shared input name (generated if omitted).

  • valuestring

    Selected value.

  • onChange(value: string) => void

    Called with the chosen value.

  • options{ value, label, disabled? }[]

    Radios to render.

  • direction'column' | 'row'
    Default: 'column'

    Layout of the radios.