Skip to content

Toggle

Switch a preference on or off while keeping its label stable.

alpina-ui/ui/toggle

Interactive preview

Usage notes

Keep the toggle’s label stable and communicate its on/off state with aria-pressed. The control supports Space and long labels can wrap.

When to use

Turn a reversible tool or formatting choice on and off while the tool stays in place.

When to avoid

Use a Button for a one-time command such as printing, and a Switch for a stored preference that applies immediately.

Accessibility

Keep the name stable and let the pressed state communicate whether the tool is active.

Keys
KeyAction
Enter / SpaceSwitch the pressed state.

Content

Use one short tool name in both states. Translate the name of the effect, not the inverse action that follows it.

Use
Bold, pressed
Avoid
Turn off bold, pressed

Copy in four languages

German
Fett4 characters
French
Gras4 characters
Italian
Grassetto9 characters
Romansh
Grass5 characters
Add to your project
npx --no-install alpina add toggle