Radio group
Choose one option from a visible set.
npx shadcn@latest add @silicon-ui/radio-groupInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/radio-groupManually
Install the dependencies
npm install motionCopy these files into your project
- components/silicon-ui/radio-group/radio-group.tsx
- components/silicon-ui/radio-group/radio-group.module.css
Shared with other components. Skip any you already have.
- components/silicon-ui/lib/fluid-hover.tsx
Add the foundation, once per app, for the design and motion tokens
npx shadcn@latest add @silicon-ui/silicon-foundation
Usage
API reference
| Prop | Type | Default |
|---|---|---|
label* | string | — |
options* | { value: string; label: string; description?: string }[] | — |
value* | string | — |
onValueChange* | (value: string) => void | — |
name | string | — |
Dependencies
- npm
- motion
- Registry
- silicon-motion-tokens