Atoms
Toggle
A two-state button that can be toggled on or off.
shadcn/uiBased on shadcn/ui with Formance brand styling.
Installation#
npx shadcn@latest add @formance/toggleInstall the following dependencies:
npm install class-variance-authority radix-uiCopy and paste the following code into your project.
Update the import paths to match your project setup.
Usage#
import { Toggle } from '@/components/ui/toggle'<Toggle aria-label="Toggle italic">
<Italic className="h-4 w-4" />
</Toggle>