Toggle Group

PreviousNext

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

Docs
bunduicomponent

Preview

Loading preview…
examples/components/toggle-group/01/page.tsx
import { Bold, Italic, Underline } from "lucide-react";

import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";

export default function ToggleGroupDemo() {
  return (
    <ToggleGroup variant="outline" type="multiple">
      <ToggleGroupItem value="bold" aria-label="Toggle bold">
        <Bold className="h-4 w-4" />
      </ToggleGroupItem>
      <ToggleGroupItem value="italic" aria-label="Toggle italic">
        <Italic className="h-4 w-4" />
      </ToggleGroupItem>
      <ToggleGroupItem value="strikethrough" aria-label="Toggle strikethrough">
        <Underline className="h-4 w-4" />
      </ToggleGroupItem>
    </ToggleGroup>
  );
}

Installation

npx shadcn@latest add @bundui/toggle-group

Usage

import { ToggleGroup } from "@/components/toggle-group"
<ToggleGroup />