››button-group
Button Group
Joins related buttons into one connected row or column, with separators and text labels between them.
Parts
| Part | File | Does |
|---|---|---|
| ButtonGroup | ButtonGroup.vue | Joins related buttons into one connected group. |
| ButtonGroupSeparator | ButtonGroupSeparator.vue | Separates two buttons inside a button group. |
| ButtonGroupText | ButtonGroupText.vue | Shows a text label as part of a button group. |
Anatomy
<ButtonGroup>
<ButtonGroup>
<ButtonGroupSeparator />
</ButtonGroup>
<ButtonGroupText />
</ButtonGroup>Styling
All of Button Group’s styles live in button-group.json. New to styling in Frontic UI? How styling works →
Install
- npm packages
- @vueuse/core
- class-variance-authority
- reka-ui
API reference
Joins related buttons into one connected group. Renders a <div>.
Props 4
| Prop | Type | Default | |
|---|---|---|---|
| asChild | boolean | false | |
| |||
| as | AsTag | Component | 'div' | |
| |||
| class | ClassValue | — | |
| |||
| orientation | ButtonGroupOrientation | ||
| |||
Data attributes 1
| Data attribute | Values | |
|---|---|---|
| data-orientation | 'vertical' | 'horizontal' | |
| ||
Recipe button-group 1 group
display flex
width fit
alignItems stretch
Button Group