Toggle
Overview
A toggle button built on Reka UI's Toggle, supporting variant and size styles via the theme system.
Theme entry: Toggle
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| themeOverride | String|Object|Array | null | A partial theme object merged with the component's default theme; accepts a class string, class array, or theme object. | |
| class | import('vue').HTMLAttributes['class'] | undefined | Additional CSS classes to apply to the root element. | |
| variant | string | "default" | Visual style variant. | |
| size | string | "default" | Size variant. | |
| pressed | boolean | undefined | Whether the toggle is pressed. | |
| defaultPressed | boolean | undefined | The default pressed state. | |
| disabled | boolean | false | Whether the toggle is disabled. | |
| as | string|object | undefined | The element or component to render as. | |
| asChild | boolean | false | When true, merges props onto the child element instead of rendering a wrapper. |
Slots
default
Scoped slot.
Events
| Name | Description |
|---|---|
update:pressed | Emitted when the pressed state changes. |
Source
client/lib/controls/toggle/Toggle.vue