Skip to content
Dumb UI

Search Dumb UI

Jump to a page or component, or switch the style

Search Dumb UI

Jump to a page or component, or switch the style

Toggle Group

A set of toggles that work as one control: single choice or multiple.

$ pnpm dlx shadcn@latest add @dumb/toggle-group

Needs the @dumb registry in components.json and the style tokens. See Installation.

import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"
<ToggleGroup type="single" variant="outline">
  <ToggleGroupItem value="day">Day</ToggleGroupItem>
  <ToggleGroupItem value="week">Week</ToggleGroupItem>
</ToggleGroup>

Multiple

Text formatting with independent toggles.

Tab
Moves focus into and out of the group.
ArrowLeftArrowRight
Moves focus between items.
SpaceEnter
Toggles the focused item.