Toggle Group
Related pressed-state buttons that share one selection, single or multiple, with arrow-key movement.
Paste this into your agent.
Toggle Group fits compact option sets that act on press, such as text alignment, list or grid view, and formatting marks. It handles single or multiple pressed items and arrow-key navigation across the set.
Install
bashnpx shadcn@4.18.0 add @siteplane/toggle-group
Import it from @/siteplane/components/toggle-group. The project needs Siteplane UI's one-time setup first: .
When to pick it
- vs : Pick Radio Group when one answer is a required form value. Toggle Group lets people clear a single selection.
- vs : Pick Tabs when each option swaps a content panel. Toggle Group changes a view setting.
- vs : Pick Toolbar when the row mixes plain buttons, selects and toggles. A Toggle Group can sit inside it.
- vs : Use a lone Toggle for a single on/off option.
Rules
- Treat
valueas an array in both single andmultiplemode. - To keep one option selected at all times, ignore empty arrays in
onValueChange. - Name each toggle group: point
aria-labelledbyat a visibleFieldLabel, or fall back toaria-label. - Set
sizeandvarianton the group so theToggleGroupItems match. Split sets withToggleGroupSeparator. - Set
orientation="vertical"for stacked items so arrow keys follow the layout.
Reference
Add to your agent
Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides
CLI
MCP server
Questions
Related skills
Siteplane Commandby UI Skillbook
A searchable, keyboard-driven list of actions, shown inline in a panel or as a command palette in a dialog.
Siteplane UI
Siteplane Navigation Menuby UI Skillbook
A row of site links where some entries open dropdown panels of further destinations.
Siteplane UI
Siteplane Tabsby UI Skillbook
Keyboard-navigable tabs that switch between related panels of content on the same page.
Siteplane UI
12 Principles of Animationby raphaelsalaja
Apply Disney's 12 animation principles to web interfaces to make motion feel natural, organic, and human.
MotionExternalGitHub stars: 42