Toggle
A button that stays pressed. Pressed fills the cell yellow and lights the lamp, so the state has a shape as well as a colour. The label never changes.
Loading the live example…
Installation
Run it where your components.json is. The first time, map the @keyline-ui registry: one command, in Installation.
Usage
Examples
Icon
With icon the toggle is a square cell. Name it with aria-label: the name says what pressing does, and aria-pressed says whether it is on.
Loading the live example…
Props
For several independent toggles in one frame, use Toggle group. For one choice of many, use Segmented. Built on Base UI Toggle.