Toggle group for view mode switching
For AI Agents
Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.
Best for: Icon only outline choice of list, grid or kanban layout, with list picked and an aria label on each
When to use
- Editor formatting and alignment controls kept as one set, such as bold, italic, underline or justify
- View, column layout and theme switchers where the pressed item holds the current choice
- Short option rows for a time range, status, sort order, billing period, channels or device settings
When not to use
- Picking how many columns a grid shows rather than which view is open: use the Toggle Group Layout Columns example
- Related actions such as export, zoom or playback joined in one strip with no pressed state: use the Button Group component
- A single on or off control such as bookmark or mute that stands on its own: use the Toggle component
- Labelled settings in a list, each flipped on or off beside its own text: use the Switch component
Agent notes
- The base twin picks one item unless
multipleis set and always takes an arraydefaultValue; the radix twin needstypesingle or multiple - No example passes
valuetoToggleGroupor reads a change back, so the pick stays inside the group; control it to act on the choice - A second click on a pressed
ToggleGroupItemreleases it in both twins, so even a single choice group can end with nothing picked
https://reui.io/components/toggle-group/c-toggle-group-8.mdget_example("c-toggle-group-8")npx shadcn@latest add @reui/c-toggle-group-8Shadcn Components in Toggle Group View Mode
About Shadcn Toggle Group View Mode
Toggle group for view mode switching. Built with the Toggle Group component. A free, open source shadcn toggle group example you can install with npx shadcn@latest add @reui/c-toggle-group-8 and edit as your own code.
What You Can Build With Shadcn Toggle Group View Mode
- Composes Toggle Group, so it drops into any project already using those components.
- Install it with the shadcn CLI: npx shadcn@latest add @reui/c-toggle-group-8
- Open source and free, with the full source on this page to copy or adapt.
More Shadcn Toggle Group Examples
- Basic Basic toggle group.
- Outline Toggle group with outline variant.
- Sizes Toggle groups in different sizes.
- Custom Spacing Toggle group with custom spacing.
- Filter Control Toggle group with filter control.
- Vertical Toggle group with vertical orientation.
- Text Alignment Toggle group for text alignment
- Vertical Settings Vertical toggle group for settings
- Color Theme Toggle group for color theme
- Font Size Toggle group for font size
- Time Range Toggle group for time range filter
- Notification Channels Toggle group for notification channels
Related Shadcn Component Categories
Open-source shadcn tooltip components for inline hints, contextual guidance, and helper text.
Open-source shadcn tree components for file explorers, nested navigation, and hierarchical data.
Open-source shadcn accordion components for FAQ layouts, settings panels, and help sections.
Open-source shadcn alert components for status messages, warning banners, and destructive notices.
Open-source shadcn alert dialog components for delete confirmations, destructive actions, and critical decisions.
Open-source shadcn aspect ratio components for responsive media, image galleries, and video previews.
Frequently Asked Questions
When should I use Shadcn Toggle Group View Mode?
Use it for icon only outline choice of list, grid or kanban layout, with list picked and an aria label on each.
Shadcn Toggle Group as a whole fits:
- Editor formatting and alignment controls kept as one set, such as bold, italic, underline or justify
- View, column layout and theme switchers where the pressed item holds the current choice
- Short option rows for a time range, status, sort order, billing period, channels or device settings
For picking how many columns a grid shows rather than which view is open, use the Toggle Group Layout Columns example. For related actions such as export, zoom or playback joined in one strip with no pressed state, use the Button Group component. For a single on or off control such as bookmark or mute that stands on its own, use the Toggle component. For labelled settings in a list, each flipped on or off beside its own text, use the Switch component.
How do I install Shadcn Toggle Group View Mode?
Is Shadcn Toggle Group View Mode free to use?
Which components does Shadcn Toggle Group View Mode use?
Start building with ReUI Pro today.
Every Pro block, every style, and every future addition, with one license for unlimited projects.
From $249, once. Lifetime updates.