Skip to main content

Installation

Usage

Examples

Single Selection

Only one item can be selected at a time.

Multiple Selection

Multiple items can be selected simultaneously.

Variants

    Sizes

    Spacing

    Control the spacing between toggle items.

    Disabled

    Controlled

      Component Code

      Props

      ToggleGroup

      ToggleGroupItem

      Composition Patterns

      Text Formatting Toolbar

      Accessibility

      • Uses role="group" for the container
      • Individual items use role="button" with aria-pressed
      • Keyboard navigation with arrow keys
      • Always include aria-label for icon-only items
      • Disabled state prevents interaction

      API Reference

      Built on top of Radix UI Toggle Group. See the official API documentation for more details.