# Toggle A switch control for binary on/off or true/false states. ## Usage Use standalone. ```svelte ``` ## Anatomy The `class` attribute values represent part names, and `conditional` indicates elements that are rendered conditionally. Other attributes represent their corresponding props. ```svelte {left} {right} ``` ## Props | Name | Type | Default | Description | |---|---|---|---| | `children` | `Snippet` | - | Toggle content; receives value, variant, and button element | | `left` | `Snippet` | - | Content before the button; receives value, variant, and button element | | `right` | `Snippet` | - | Content after the button; receives value, variant, and button element | | `value` | `boolean` | `false` | Bindable pressed state | | `role` | `` | `"button"` | ARIA role, either button or switch | | `ariaLabel` | `string` | - | Accessible label for icon-only or text-less toggles | | `attach` | `Attachment` | - | Svelte attachment on the button | | `element` | `HTMLButtonElement` | - | Bindable button element | | `styling` | `SVSClass` | - | Styling override | | `variant` | `SVSVariant` | `NEUTRAL` | Bindable variant | Other `HTMLButtonAttributes` are passed to `