UI Siêu Ngon

Radio

Single-choice selection group. Use Radio.Group as a wrapper and nest Radio items inside.

Playground
direction
size
disabled
rounded
<Radio.Group
  value={value}
  onChange={setValue}
>
  <Radio value="monthly" label="Monthly billing" />
  <Radio value="yearly"  label="Yearly billing" />
  <Radio value="lifetime" label="Lifetime" />
</Radio.Group>

Basic

Horizontal

Use direction='horizontal' for a row layout.

Sizes

Disabled

Disable the whole group or individual options.

Radio.Group API

PropertyTypeDefaultDescription
valuestring | numberControlled value
defaultValuestring | numberDefault value for uncontrolled usage
onChange(value: string | number) => voidCalled when selection changes
namestringauto-generatedHTML name attribute shared by all radios in the group
disabledbooleanfalseDisable all radios in the group
direction"horizontal" | "vertical""vertical"Layout direction
size"sm" | "md" | "lg""md"Size preset

Radio API

PropertyTypeDefaultDescription
value*string | numberValue for this radio option
labelReactNodeLabel text next to the radio
disabledbooleanfalseDisable this specific radio