Toggle API
API reference for the Toggle components.
Related
Explore these related pages for additional context and usage patterns.
| Page | Category |
|---|---|
| Toggle | Actions |
| createSingle | Selection |
| createGroup | Selection |
| Checkbox | Forms |
| Button | Actions |
Toggle.Root
Props
namespace
string | undefinedNamespace for context provision to children (Indicator)
Default: "v0:toggle:root"
groupNamespace
string | undefinedNamespace for connecting to parent Toggle.Group
Default: "v0:toggle:group"
modelValue
boolean | undefinedEvents
update:model-value
[value: boolean]Slots
default
ToggleRootSlotPropsToggle.Group
Props
Events
update:model-value
[value: T | T[]]Slots
default
ToggleGroupSlotPropsToggle.Indicator
Props
namespace
string | undefinedNamespace for context injection from parent Toggle.Root
Default: "v0:toggle:root"
Slots
default
ToggleIndicatorSlotProps