Radio group

Choose one option from a visible set.

npx shadcn@latest add @silicon-ui/radio-group
fieldchoice
Loading…

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/radio-group

Manually

  1. Install the dependencies.

    npm install motion
  2. Copy these files into your project. Shared files are skipped if you already have them.

    • components/silicon-ui/radio-group/radio-group.tsx
    • components/silicon-ui/radio-group/radio-group.module.css
  3. Install the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

Source codetsx
import { RadioGroup } from "@/components/silicon-ui/radio-group/radio-group";

API reference

PropTypeDefault
label*string—
options*{ value: string; label: string; description?: string }[]—
value*string—
onValueChange*(value: string) => void—
namestring—

Dependencies

npm
motion
Registry
silicon-motion-tokens