Animate UI

Toggle Group

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

Made by imskyleen
Edit on GitHub

Installation

Usage

<ToggleGroup type="single" defaultValue="bold">
  <ToggleGroupItem value="bold" />
  <ToggleGroupItem value="italic" />
  <ToggleGroupItem value="underline" />
</ToggleGroup>

API Reference

ToggleGroup

PropTypeDefault
variant?
"default" | "outline"
-
size?
"default" | "sm" | "lg" | "icon"
-
...props?
HTMLMotionProps<"button">
-

ToggleGroupItem

PropTypeDefault
variant?
"default" | "outline"
-
size?
"default" | "sm" | "lg" | "icon"
-
...props?
HTMLMotionProps<"button">
-

The asChild property is not supported in the ToggleGroupItem component, as it is used for animation.

Credits

Built by Skyleen. The source code is available on GitHub.