Toggle Sidebar B
header.lightDarkMode D

Toggle

Two-state pressable button. Use inside toolbars for formatting controls (bold, italic, align).

Default

Pressable two-state button.

Variants

default and outline.

Sizes

sm, default, lg.

API Reference

Props, events, and slots for each sub-component.

Toggle

Props

PropTypeDefaultDescription
modelValuebooleanfalsePressed state. Supports v-model.
defaultValuebooleanfalseInitial state.
variant"default" | "outline""default"Visual style.
size"sm" | "default" | "lg""default"Size variant.
disabledbooleanfalseDisable input.

Events

EventDescription
update:modelValueFires when the pressed state toggles. Enables v-model.

Accessibility

Keyboard shortcuts and ARIA behavior.

Keyboard

ShortcutDescription
SpaceToggles the pressed state when focused.
EnterToggles the pressed state when focused.
TabMoves focus to or from the toggle.
  • aria-pressed reflects the on/off state.
  • Provide accessible text or an aria-label when the toggle is icon-only.