Component · C-041
ToggleGroup
A set of options that stay pressed, such as view or density. It supports single or multiple selection and keeps focus inside the group.
Install
Install koten-theme first when the project has no Koten tokens yet.
npx shadcn@latest add https://koten.codehive.com.co/r/toggle-group.jsonAccessibility
- label names the whole group through aria-label.
- Each option exposes aria-pressed; Base UI moves focus with the arrow keys.
- Options with an icon keep their name in sr-only text.
- The pressed state changes background, weight and text color, not color alone.