Button Group

Row of related buttons joined by shared borders. It can also work as a single-choice control, with an accent pill that glides to whichever option you pick.

Preview

Installation

npx @lumioui/cli add button-group

Usage

import { ButtonGroup } from "@/components/ui/button-group/button-group";
<ButtonGroup />

Examples

Actions

An attached RSVP group on a calendar invite.

Slots

Detached groups as a barber's open slots.

API reference

Prop Type Default
attached boolean

Attach buttons together (shared borders, merged radius). Default true.

true
orientation "horizontal" | "vertical"

Orientation of the group. Default "horizontal".

"horizontal"
disabled boolean

Disable every child in the group.

—
className string —
itemClassName string

Extra classes merged into each child element that accepts className.

—
value string | null

Selected child (matched against each child's React key). Controlled.

—
defaultValue string | null

Initial selection when uncontrolled.

—
onValueChange (value: string) => void

Fires when a child is pressed in selection mode, after its own onPress.

—
children React.ReactNode —