Atoms
Radio Group
A set of checkable buttons where only one can be checked at a time.
shadcn/uiBased on shadcn/ui with Formance brand styling.
Installation#
npx shadcn@latest add @formance/radio-groupInstall the following dependencies:
npm install radix-ui lucide-reactCopy and paste the following code into your project.
Update the import paths to match your project setup.
Usage#
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'<RadioGroup defaultValue="ledger"> <div className="flex items-center gap-2"> <RadioGroupItem value="ledger" id="ledger" /> <Label htmlFor="ledger">Ledger</Label> </div> <div className="flex items-center gap-2"> <RadioGroupItem value="payments" id="payments" /> <Label htmlFor="payments">Payments</Label> </div></RadioGroup>