ToggleButton renders its initial pressed state on the server, but state changes require the client runtime. This server-rendered page does not imitate client behavior. Open the live playground.
Usage
ToggleButton usage<ToggleButton defaultPressed>Pin</ToggleButton>API
ToggleButton APIToggleButtonProps
A toolbar toggle: a native `<button aria-pressed>` for independent stateful actions (pin, mute, bold). Distinct vocabulary from Switch (form on/off, role=switch) and SegmentedControl (exclusive choice). NOT built on remix/ui/toggle/primitives — that primitive stamps `role="switch"` semantics, the wrong vocabulary here, and flipping one boolean on a native button (click + Space/Enter already browser-owned) is closure logic, not an aria rebuild. Island doctrine for toggling.
| prop | type | notes |
|---|---|---|
| children? | RemixNode | |
| defaultPressed? | boolean | |
| onPressedChange? | (pressed: boolean) => void | Fires after each flip with the new state. |
| label? | string | Accessible name when children are glyph-only. |
| size? | BtnSize | |
| disabled? | boolean | |
| mix? | MixInput |