+
Best practices
+
We recommend the following guidelines for using button groups and toolbars:
+
+ - Always use the same element in a single button group,
<a>
or <button>
.
+ - Don't mix buttons of different colors in the same button group.
+ - Use icons in addition to or instead of text, but be sure include alt and title text where appropriate.
+
+
Related Button groups with dropdowns (see below) should be called out separately and always include a dropdown caret to indicate intended behavior.
+
+
Default example
+
Here's how the HTML looks for a standard button group built with anchor tag buttons:
+
+
+<div class="btn-group">
+ <a class="btn" href="#">1</a>
+ <a class="btn" href="#">2</a>
+ <a class="btn" href="#">3</a>
+</div>
+
+
Toolbar example
+
Combine sets of <div class="btn-group">
into a <div class="btn-toolbar">
for more complex components.
-
-
Example markup
-
Here's how the HTML looks for a standard button group built with anchor tag buttons:
-
-<div class="btn-group">
- <a class="btn" href="#">1</a>
- <a class="btn" href="#">2</a>
- <a class="btn" href="#">3</a>
-</div>
-
-
And with a toolbar for multiple groups:
<div class="btn-toolbar">
<div class="btn-group">
diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache
index 2262830041..62a7083b61 100644
--- a/docs/templates/pages/components.mustache
+++ b/docs/templates/pages/components.mustache
@@ -42,14 +42,34 @@
{{_i}}Button groups{{/i}}
{{_i}}Use button groups to join multiple buttons together as one composite component. Build them with a series of <a>
or <button>
elements.{{/i}}
-
{{_i}}You can also combine sets of <div class="btn-group">
into a <div class="btn-toolbar">
for more complex projects.{{/i}}
-