saturation/uisaturation/ui
DocsComponentsBlocksPages
GitHub

Sections

IntroductionComponentsInstallationMCPTheming

Components

ComponentsAccordionAI Chat InputAlertAnimated GroupAnimated NumberAvatarBadgeBeamBlur FadeBorder TrailBreadcrumbButtonButton GroupCalendar PickerCardChartCheckboxCollapsibleComboboxCommandComparison SliderContext MenuCredit CardData TableDate PickerDialogDropdown MenuEmoji PickerEmptyFieldFiltersFull CalendarGlow EffectInputInput GroupInput OTPItemKanbanKbdMenubarNavigation MenuNovel EditorPaginationParallaxProgressProgressive BlurRadio GroupRippleSelectSeparatorSheetSkeletonSliderSonnerSpinnerSpotlightSwitchTableTabsText EffectText ShimmerTextareaToggleToggle GroupTreeTypography
Docs/Components/Toggle Group

Toggle Group

A set of two-state buttons that can be toggled on or off.

Loading...

Installation

pnpm dlx shadcn@latest add https://ui.saturation.io/r/toggle-group.json

Tailwind v4 — Source Scanning

Saturation UI copies component source into your project via the shadcn registry (no npm package). If Tailwind v4 isn't scanning your components directory, add this to your CSS entry file:

@source "../components";

This ensures all utility classes in CVA variants and data attribute selectors are included in your build.

Usage

import {
  ToggleGroup,
  ToggleGroupItem,
} from "@/components/ui/toggle-group"
<ToggleGroup type="single">
  <ToggleGroupItem value="a">A</ToggleGroupItem>
  <ToggleGroupItem value="b">B</ToggleGroupItem>
</ToggleGroup>

Examples

Outline

Loading...
Outline variant.

Sizes

Loading...
Size variants.

API Reference

PropTypeDefaultDescription
type*"single" | "multiple"—Whether single or multiple items can be pressed.
valuestring | string[]—The controlled value.
onValueChange(value: string | string[]) => void—Event handler for value changes.
PreviousThinking IndicatorNextToggle

On This Page

  • Installation
  • Usage
  • Examples
  • Outline
  • Sizes
  • API Reference