RadioGroup
Loading example…
RadioGroup is part of the Atoms set, imported from @jcsoftdev/ui/atoms.
Import
Section titled “Import”import { RadioGroup } from "@jcsoftdev/ui/atoms";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/atoms/radio-group.
<RadioGroup options={options} defaultValue="efectivo" aria-label="Método de pago"/>| Prop | Type | Default | Description |
|---|---|---|---|
classNames |
Partial<Record<RadioGroupPart, string>> |
Per-part classes merged with cn; consumer classes win. className still targets the root and is merged last. |
|
options * |
RadioOption[] |
||
value |
string |
||
defaultValue |
string |
||
onValueChange |
((value: string) => void) |
||
name |
string |
||
form |
string |
||
required |
boolean |
||
disabled |
boolean |
||
orientation |
"horizontal" | "vertical" |
||
dir |
"ltr" | "rtl" |
||
loop |
boolean |
* marks a required prop.
It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).
Storybook stories
Section titled “Storybook stories”- Default
- Without Descriptions
- Disabled
- Controlled
- Disabled Item Skipped By Arrows
- Form Submit And Reset
- Named From Label
Source
Section titled “Source”packages/ui/src/atoms/radio-group/radio-group.tsx