❤️ Support our project - Your donation helps us continue developing awesome tools!


Docs
Toggle Group

Toggle Group

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

A toggle group with three items.

Installation

npx nyxb@latest add toggle-group

Usage

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

Examples

Default

A toggle group with three items.

Outline

A toggle group using the outline variant.

Single

A toggle group with single selection.

Small

A toggle group using the small size.

Large

A toggle group using the large size.

Disabled

A disabled toggle group.