Toggle Group
A set of two-state buttons that can be toggled on or off.
// src/components/ui/toggle-group.tsx — a row of Toggle buttons. Add data-ui="toggle" to each;
// for single-select, scope them in a wrapper and clear siblings in the island.
Installation
$ bext ui add toggle-group
Copy and paste the following into src/components/ui/toggle-group.tsx.
// src/components/ui/toggle-group.tsx — a row of Toggle buttons. Add data-ui="toggle" to each;
// for single-select, scope them in a wrapper and clear siblings in the island.
This component is interactive — make sure the shared island is loaded (see Islands). It reacts to data-ui="toggle-group" hooks.
On This Page