Skip to content

Commit ce732bd

Browse files
authored
docs(button-group): minor update
1 parent 7091262 commit ce732bd

File tree

1 file changed

+47
-41
lines changed

1 file changed

+47
-41
lines changed

docs/components/button-group/README.md

Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,81 @@
22

33
> Group a series of buttons together on a single line with `<b-button group>`.
44
5-
**Example 1:** Default, Small, and Large button groups
5+
**Example 1:** Default button group and button group using contextual variants
66
```html
77
<div>
88
<b-button-group>
99
<b-button>Button 1</b-button>
1010
<b-button>Button 2</b-button>
1111
<b-button>Button 3</b-button>
12+
<b-button>Button 4</b-button>
13+
<b-button>Button 5</b-button>
1214
</b-button-group>
13-
<br>
14-
<br>
15+
<br><br>
16+
<b-button-group>
17+
<b-button variant="success">Success</b-button>
18+
<b-button variant="info">Info</b-button>
19+
<b-button variant="warning">Warning</b-button>
20+
<b-button variant="primary">Primary</b-button>
21+
<b-button variant="danger">Danger</b-button>
22+
<b-button variant="link">Link</b-button>
23+
</b-button-group>
24+
</div>
25+
26+
<!-- button-group-1.vue -->
27+
```
28+
29+
### Sizing
30+
Set the size prop to `lg` or `sm` to render larger or smaller, respectively, buttons.
31+
There is no need to specify the size on the individual buttons.
32+
33+
**Example 2:** Default, Small, and Large button groups
34+
```html
35+
<div>
36+
<b-button-group>
37+
<b-button>Button 1</b-button>
38+
<b-button>Button 2</b-button>
39+
<b-button>Button 3</b-button>
40+
</b-button-group>
41+
<br><br>
1542
<b-button-group size="sm">
1643
<b-button>Left</b-button>
1744
<b-button>Middle</b-button>
1845
<b-button>Right</b-button>
1946
</b-button-group>
20-
<br>
21-
<br>
47+
<br><br>
2248
<b-button-group size="lg">
2349
<b-button>Left</b-button>
2450
<b-button>Middle</b-button>
2551
<b-button>Right</b-button>
2652
</b-button-group>
2753
</div>
2854

29-
<!-- button-group-1.vue -->
55+
<!-- button-group-2.vue -->
3056
```
3157

32-
**Example 2:** Default button group with contextual variants
58+
### Vertical variation
59+
Make a set of buttons appear vertically stacked rather than horizontally by setting
60+
the `vertical` prop. Split button dropdowns are not supported here.
61+
62+
**Example 3:** Vertical button group
3363
```html
3464
<div>
35-
<b-button-group>
36-
<b-button variant="success">Success</b-button>
37-
<b-button variant="info">Info</b-button>
38-
<b-button variant="warning">Warning</b-button>
39-
<b-button variant="primary">Primary</b-button>
40-
<b-button variant="danger">Danger</b-button>
41-
<b-button variant="link">Link</b-button>
65+
<b-button-group vertical>
66+
<b-button>Top</b-button>
67+
<b-button>Middle</b-button>
68+
<b-button>Bottom</b-button>
4269
</b-button-group>
4370
</div>
4471

45-
<!-- button-group-2.vue -->
72+
<!-- button-group-3.vue -->
4673
```
4774

48-
**Example 3:** button group with dropdown menus
75+
### Dropdown menu support
76+
Add [`<b-dropdown>`](./dropdown) menus directly inside your `<b-button-group>`. Note
77+
that split dropdown menus are not supported when prop `vertical` is set.
78+
79+
**Example 4:** button group with dropdown menus
4980
```html
5081
<div>
5182
<b-button-group>
@@ -67,34 +98,9 @@
6798
</b-button-group>
6899
</div>
69100

70-
<!-- button-group-3.vue -->
71-
```
72-
73-
**Example 4:** Vertical button group
74-
```html
75-
<div>
76-
<b-button-group vertical>
77-
<b-button>Top</b-button>
78-
<b-button>Middle</b-button>
79-
<b-button>Bottom</b-button>
80-
</b-button-group>
81-
</div>
82-
83101
<!-- button-group-4.vue -->
84102
```
85103

86-
### Sizing
87-
Set the size prop to `lg` or `sm` to render larger or smaller, respectively, buttons.
88-
There is no need to specify the size on the individual buttons.
89-
90-
### Vertical variation
91-
Make a set of buttons appear vertically stacked rather than horizontally by setting
92-
the `vertical` prop. Split button dropdowns are not supported here.
93-
94-
### Dropdown menu support
95-
Add [`<b-dropdown>`](./dropdown) menus directly inside your `<b-button-group>`. Note
96-
that split dropdown menus are not supported when prop `vertical` is set.
97-
98104
### Alias
99105
`<b-button-group>` can also be used by its shorter alias `<b-btn-group>`.
100106

0 commit comments

Comments
 (0)