Skip to content
Component

Button Group

Groups related buttons with shared, touching edges. Pass items with value/onValueChange for a real single-selection control.

Single selection

With items and a value the group becomes a radiogroup: the selected item takes the group's contained color, and arrow keys move the selection.

Selected: week

Grouping (no selection)

Vertical

API reference

itemsNone
ButtonGroupItem[]

Enables keyboard-accessible single-select mode.

value / defaultValueNone
string

Controlled or uncontrolled selected item.

orientation"horizontal"
"horizontal" | "vertical"

Group direction.

classNameNone
string

Additional classes applied to the component root.