Toggle Group

Grouped options for single-select choices.

Installation

Add this item from the registry, or import it from the package after installing Default File UI.

Registry path

itsvigneshv/default-file-ui/toggle-group

Package import

import { ToggleGroup, ToggleGroupItem } from "@default-file/ui/components/df-toggle-group"

Default

Single-select group.

Variants

Default and outline styles.

Sizes

Small, default, and large.

Orientation

Lay items out horizontally or vertically.

Radius

Adjust corner rounding from a full pill to a tighter square.

Multiple

Press more than one item at a time.

Properties

Grouped single- or multi-select toggles. Compose ToggleGroup and ToggleGroupItem.

ToggleGroup

PropTypeDefaultNotes
variant"default" | "outline""default"Visual style for items.
size"default" | "sm" | "lg""default"Item height and type size.
radius"sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "full"Corner radius of the group. Defaults to a pill look.
spacingnumber2Gap between items (design-scale units).
orientation"horizontal" | "vertical""horizontal"Layout direction.
multiplebooleanfalseAllow more than one selected value.
valuestring[]Controlled selected values.
defaultValuestring[][]Uncontrolled initial values.
onValueChange(value: string[]) => voidCalled when selection changes.
disabledbooleanfalseDisable the whole group.

ToggleGroupItem

PropTypeDefaultNotes
valuestringItem value (required).
variant"default" | "outline"Override group variant for this item.
size"default" | "sm" | "lg"Override group size for this item.
disabledbooleanNon-interactive item.
childrenReactNodeItem label or icon.