Components
Radio Group
Choose one of a list, each option with a label and a description; native radios, so arrow keys work.
Import
import { RadioGroup, Radio } from '@rinzai/zen';Examples
Horizontal
In a row, with one option disabled.
API reference
<RadioGroup>
Choose one of a list: native radios underneath, so arrow keys move and pick within the group, and forms work as usual. Fill it with Radio. For a few short options side by side use Segmented; for options that show themselves, RadioCards.
| Prop | Type | Default |
|---|---|---|
childrenRequiredThe Radios. | ReactNode | — |
onChangeRequired | (value: V) => void | — |
valueRequiredThe chosen option, or null for none yet. | string | null | — |
aria-describedby | string | — |
aria-label | string | — |
classNameClasses for the options' container. | string | — |
disabled | boolean | false |
labelShown above the options, naming the group. Without it, give the group an aria-label. | ReactNode | — |
nameForm field name; defaults to a generated one. | string | — |
orientationOptions in a column (default) or wrapping in a row. | "horizontal" | "vertical" | vertical |
<Radio>
One option: a round radio that fills with a glowing dot when chosen, its label, and an optional description.
| Prop | Type | Default |
|---|---|---|
childrenRequiredThe label. | ReactNode | — |
valueRequired | string | — |
className | string | — |
descriptionA muted line under the label. | ReactNode | — |
disabledCan't be chosen (and the arrow keys skip it). | boolean | — |