inputs
Radio
Radio button group built on Radix UI RadioGroup. Size and error state propagate to all items via context.
Import
import { RadioGroup, RadioItem } from '@stella-ds/react'RadioGroupRadioItem
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| size (RadioGroup) | 'sm' | 'md' | 'lg' | 'md' | Size preset for all items |
| error (RadioGroup) | boolean | false | Error state for all items |
| orientation (RadioGroup) | 'horizontal' | 'vertical' | 'vertical' | Layout direction |
| value (RadioItem) | string | — | Required. Value this item represents |
| label (RadioItem) | ReactNode | undefined | Optional label |
Preview
Examples
Basic
<RadioGroup defaultValue="b">
<RadioItem value="a" label="Option A" />
<RadioItem value="b" label="Option B" />
<RadioItem value="c" label="Option C" disabled />
</RadioGroup>