Toggle
Preview
Section titled “Preview”Status: Not pressed
Installation
Section titled “Installation”npx skeci-ui add toggleimport { Toggle } from '@/components/ui/toggle';import { Bold } from 'lucide-react';
<Toggle aria-label="Toggle bold"> <Bold className="h-4 w-4" /></Toggle>Variants
Section titled “Variants”| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'outline' | 'default' | The visual style. |
size | 'default' | 'sm' | 'lg' | 'default' | The size of the toggle. |
border | 'rough' | 'normal' | 'rough' | The type of border drawing. |
pressed | boolean | — | The controlled pressed state. |
defaultPressed | boolean | false | The initial pressed state when uncontrolled. |
onPressedChange | (pressed: boolean) => void | — | Callback fired when the state changes. |