structyl

Button Group

stable

Groups related buttons together.

Basic usage

Examples

Horizontal group

Group related actions into one visual control.

Vertical group

Use vertical orientation for toolbar menus or compact side controls.

Shared button props

ButtonGroup propagates variant, color, size, disabled and fullWidth to Structyl Button children.

Features

  • Horizontal or vertical.
  • Shared border treatment.

Installation

bash
pnpm dlx structyl add button-group

API Reference

ButtonGroup

Groups buttons and propagates shared button props.

PropTypeDefault
orientation'horizontal' | 'vertical'

Button group axis.

'horizontal'
variant'contained' | 'outlined' | 'text'

Variant applied to Structyl Button children.

'outlined'
color'default' | 'primary' | 'secondary' | 'destructive' | 'muted'

Color mapped to Structyl button variants.

'default'
size'small' | 'medium' | 'large'

Size applied to Structyl Button children.

'medium'
disabledboolean

Disable child buttons.

fullWidthboolean

Stretch group and children.

false
classNamestring

Additional Tailwind classes merged with the component defaults.

Button Group | structyl