Basic toggle group.
For AI Agents
Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.
Best for: Bold, italic and underline as borderless icon buttons that can all be on at once, none pressed at load
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
- Formatting where only one option applies at a time, such as text alignment: use the Toggle Group Text Alignment 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-1.mdget_example("c-toggle-group-1")npx shadcn@latest add @reui/c-toggle-group-1Shadcn Components in Toggle Group Basic
About Shadcn Toggle Group Basic
Basic toggle group. 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-1 and edit as your own code.
What You Can Build With Shadcn Toggle Group Basic
- 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-1
- Open source and free, with the full source on this page to copy or adapt.
More Shadcn Toggle Group Examples
- 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
- View Mode Toggle group for view mode switching
- 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 Basic?
Use it for bold, italic and underline as borderless icon buttons that can all be on at once, none pressed at load.
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 formatting where only one option applies at a time, such as text alignment, use the Toggle Group Text Alignment 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 Basic?
Is Shadcn Toggle Group Basic free to use?
Which components does Shadcn Toggle Group Basic 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.