Tonic UI
Getting StartedColor ModeColor StyleVersionsContributing
THEME
BordersBreakpointsColorsOutlinesPositionsSpacingSizesShadowsTypography
BUILDING BLOCKS
BoxControlBox
UTILITIES

ButtonGroup

ButtonGroup is used to group related buttons.

Import

Usage

Basic button group

EDITABLE EXAMPLE

Group variants

Use the variant prop to change the visual style of every button in a group. You can set the value to emphasis, primary, default, secondary and ghost.

EDITABLE EXAMPLE

Group sizes

Use the size prop to change the size of the ButtonGroup. You can set the value to sm, md, or lg.

EDITABLE EXAMPLE

Group orientation

Make a set of buttons appear vertically stacked rather than horizontally, by adding orientation="vertical" to the ButtonGroup component.

EDITABLE EXAMPLE

Button states

EDITABLE EXAMPLE

Props

NameTypeDefaultDescription
sizestring'md'The size for all buttons in the group. Acceptable values: 'sm', 'md', 'lg'
variantstring'default'The variant of all buttons in the group. Acceptable values: 'emphasis', 'primary', 'default', 'secondary', 'ghost'
orientationstring'horizontal'The orientation of the Buttons. Acceptable values: 'horizontal', 'vertical'