Radio Group API
View componentThe full prop reference for the Radio Group component. A set of checkable buttons where only one can be checked at a time.
Import
import { RadioGroup } from '@structyl/styled';Props
Root
Container for radio group with managed state and keyboard navigation
| Prop | Type | Default |
|---|---|---|
| value# | stringControlled value of the selected radio item | — |
| defaultValue# | stringUncontrolled default value for the selected radio item | — |
| onValueChange# | (value: string) => voidCallback fired when selected value changes | — |
| disabled# | booleanDisables all items in the group | false |
| required# | booleanMakes selection required for form submission | false |
| name# | stringName attribute for hidden input elements (for form submission) | — |
| orientation# | 'horizontal' | 'vertical'Layout direction for keyboard navigation | 'vertical' |
| dir# | 'ltr' | 'rtl'Text direction for keyboard navigation behavior | — |
| loop# | booleanWhether keyboard focus wraps around to opposite end | true |
| asChild# | booleanRender as child component (merge props with single child) | — |
| className# | stringCSS class name (styled version adds default grid layout) | — |
Item
Individual radio button option (styled version with color support)
| Prop | Type | Default |
|---|---|---|
| value# | stringUnique value for this radio option (required) | — |
| disabled# | booleanDisables this individual radio item | — |
| asChild# | booleanRender as child component (merge props with single child) | — |
| color# | 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success'Styled-layer only: color theme for border and indicator | 'primary' |
| className# | stringCSS class name (styled version applies 4x4 h-4 w-4 default) | — |
Indicator
Visual indicator shown when radio item is checked (primitives only)
| Prop | Type | Default |
|---|---|---|
| forceMount# | booleanMount indicator regardless of checked state (useful for animations) | — |
| asChild# | booleanRender as child component (merge props with single child) | — |
| className# | stringCSS class name | — |
Source code
If you didn't find what you need here, read the component implementation .