---
## Toggle
Accessible switch control for boolean on/off states.
Built on a hidden native input with semantic intents and Mint micro-interactions.
**Import:** `import { Toggle } from '@urbicon-ui/blocks';`
### Examples
```svelte
```
```svelte
console.log('toggled', val)}
/>
```
```svelte
```
### Variants
- intent: danger, neutral, primary, secondary, success, warning (default: primary)
- variant: default, dot (default: default)
- default — Classic switch pill — a track with an animated thumb.
- dot — Small indicator dot left of the label — outline only when off, filled in the intent colour when on; monochrome, no pill background.
- size: lg, md, sm, xs (default: md)
- disabled: true (default: false)
- tier: commit, modify (default: commit)
- withBorder: false, true (default: false)
### Api
| Prop | Type | Required | Default | Description |
| --- | --- | :---: | --- | --- |
| ...HTMLInputAttributes | `HTMLAttributes` | no | | HTML attributes (excluding: 'type' | 'size' | 'checked' | 'class' | 'children') |
| ...ToggleVariants | `VariantProps` | no | | Styling variants from ToggleVariants |
| checked | `boolean` | no | | Current on/off state. Supports two-way binding via `bind:checked`. |
| class | `string` | no | | Extra classes merged onto the outermost wrapper element. In the same Tailwind bucket `class` wins over the `slotClasses` entry for the element it lands on. Presets and provider defaults sit below both. |
| disabled | `boolean` | no | | Prevent interaction and dim the control. |
| error | `string` | no | | Error message shown below the control. Replaces `helper`, flags the hidden input `aria-invalid`, and marks the unchecked track with the danger colour — e.g. for a consent toggle that must be switched on. |
| helper | `string` | no | | Helper text shown below the control. Hidden when `error` is set. Useful for explaining side-effects of the toggle. |
| id | `string` | no | | Explicit `id` to link `