Radio cards
Selectable option cards with a sliding selection ring, price and description slots, and radio keyboard behavior.
A monthly and yearly switch with a savings badge and prices that roll to the new amount.
npx shadcn@latest add @silicon-ui/billing-togglenpx shadcn@latest add @silicon-ui/billing-toggleInstall the dependencies.
npm install motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/billing-toggle/billing-toggle.tsxcomponents/silicon-ui/billing-toggle/billing-toggle.module.csscomponents/silicon-ui/animated-counter/animated-counter.tsx sharedcomponents/silicon-ui/animated-counter/animated-counter.module.css sharedInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
BillingToggle| Prop | Type | Default |
|---|---|---|
value* | string | — |
onValueChange* | (value: string) => void | — |
options | BillingToggleOption[] | DEFAULT_OPTIONS |
labelAccessible name of the group. | string | "Billing period" |
size | "md" | "lg" | "md" |
className | string | — |
BillingPrice| Prop | Type | Default |
|---|---|---|
amount* | number | — |
currency | string | "$" |
periodPeriod after the price, e.g. "per month". Swaps in place when it changes. | string | — |
wasPrevious price, shown struck through when it is higher than `amount`. | number | — |
decimals | number | 0 |
className | string | — |