Toggle
A button that stays pressed.Toggle is a button with two states: bold in a formatting bar, a filter that is on or off. It is a Button in every other respect and wears Button's pressed look while on. Picking one of several is a Segmented Control.
Playground
Usage
Props
Toggle takes every Button prop except as, and these:
Accessibility
- Toggle sets
aria-pressedand announces the new state with its name when pressed. - An
iconOnlytoggle has no visible text, so the type requiresaria-labeloraria-labelledby.