A button with an on/off pressed state. Comes in several sizes.
Copy the command below and run it in your terminal.
bunx @sivir/ui add toggle
pnpm dlx @sivir/ui add toggle
npx @sivir/ui add toggle
yarn dlx @sivir/ui add toggle
Import Toggle and bind its pressed state:
import { Toggle } from '$lib/sivir/components/toggle'; <Toggle bind:pressed={bold}> <Bold size={14} /> </Toggle>
Toggle in different sizes and variants.