Billing toggle
A monthly and yearly switch with a savings badge and prices that roll to the new amount.
Selectable option cards with a sliding selection ring, price and description slots, and radio keyboard behavior.
npx shadcn@latest add @silicon-ui/radio-cardsnpx shadcn@latest add @silicon-ui/radio-cardsInstall the dependencies.
npm install motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/radio-cards/radio-cards.tsxcomponents/silicon-ui/radio-cards/radio-cards.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
options* | RadioCardOption[] | — |
value | string | null | — |
defaultValue | string | null | null |
onValueChange | (value: string) => void | — |
layout"grid" places cards in responsive columns; "list" stacks full width rows. | "grid" | "list" | "grid" |
minColumnWidthNarrowest a grid column may get before the grid drops a column, in px. | number | 180 |
nameForm field name. Renders a hidden input with the selected value. | string | — |
required | boolean | — |
disabled | boolean | false |
Also accepts the props of HTMLAttributes<HTMLDivElement>, except onChange, defaultValue.