Back to ButtonGroup
ButtonGroup

Options API

Single-select time range and multi-select formatting toolbar with a separator.

Choose the reporting period for the chart.

Toggle one or more formatting styles.

API

PropTypeDefaultDescription
options*ButtonGroupOption | { type: "separator" }[]Option list rendered as merged buttons; separator items divide segments.
multiplebooleanfalseWhen true, value is string[] and options toggle independently.
value / defaultValuestring | string[]Controlled / uncontrolled selected value(s).
onValueChange(value: string | string[]) => voidFires when the selection changes.
labelReact.ReactNodeTop field label.
helpTextReact.ReactNodeGroup-level help text.
errorReact.ReactNodeError text; sets `aria-invalid` on the group.
requiredbooleanMarks the field as required.
orientation"horizontal" | "vertical"horizontalLayout direction for merged buttons.
sizeButton sizesmSize applied to every option button.
variantButton variantoutlineVariant for unselected options.
selectedVariantButton variantsolidVariant for selected options.
disabledbooleanDisables every option in the group.
classNamestringMerged with the inner group classes.
View full API on ButtonGroup

More ButtonGroup examples