Button Group
stableGroups 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-groupAPI Reference
ButtonGroup
Groups buttons and propagates shared button props.
| Prop | Type | Default |
|---|---|---|
| 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' |
| disabled | booleanDisable child buttons. | — |
| fullWidth | booleanStretch group and children. | false |
| className | stringAdditional Tailwind classes merged with the component defaults. | — |