# Toggle ## Example ```svelte
Toggle Toggle
``` ## Documentation ## Usage ```svelte Toggle ``` ## Sources This component uses the bits-ui component: Toggle, see here for the documentation for that: https://bits-ui.com/docs/components/toggle/llms.txt ## API Reference ### Toggle A two-state button that can be toggled on or off. Built on top of the bits-ui Toggle primitive. | Prop | Type | Default | Description | |------|------|---------|-------------| | pressed | `boolean` | `false` | Whether the toggle is pressed. (bindable) | | onPressedChange | `(pressed: boolean) => void` | `-` | A callback invoked when the pressed state changes. | | variant | `'default'` | `'default'` | The visual variant of the toggle. | | size | `'default' | 'sm' | 'lg'` | `'default'` | The size of the toggle. | | disabled | `boolean` | `false` | Whether the toggle is disabled. | | class | `string` | `-` | Additional CSS classes to apply. | | ref | `HTMLElement` | `-` | The underlying DOM element. (bindable) |