RadioGroup
inputsA set of checkable buttons—known as radio buttons—where no more than one can be checked at a time.
Preview
Installation
npm install @launchapp/design-systemImport
import { RadioGroup, RadioGroupItem } from "@launchapp/design-system";Examples
Radio Group
<RadioGroup defaultValue="option-one"> <div className="flex items-center space-x-2"> <RadioGroupItem value="option-one" id="option-one" /> <Label htmlFor="option-one">Option One</Label> </div> <div className="flex items-center space-x-2"> <RadioGroupItem value="option-two" id="option-two" /> <Label htmlFor="option-two">Option Two</Label> </div></RadioGroup>Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Controlled selected value. |
defaultValue | string | — | Initial value when uncontrolled. |
onValueChange | (value: string) => void | — | Callback when value changes. |
disabled | boolean | false | Disables all radio buttons. |
orientation | "horizontal" | "vertical" | "vertical" | Orientation of the group. |