From c09b994eea35da794b1905bf0a56485aeb28158a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 5 Feb 2013 00:30:03 -0800 Subject: Add justified button groups for link buttons; reorganize dropdowns and button groups docs sections --- docs/components.html | 48 +++++++++++++++++++----------------------------- 1 file changed, 19 insertions(+), 29 deletions(-) (limited to 'docs/components.html') diff --git a/docs/components.html b/docs/components.html index ade79e7b5..49db6f6bb 100644 --- a/docs/components.html +++ b/docs/components.html @@ -109,9 +109,10 @@ +

Toggleable, contextual menu for displaying lists of links. Made interactive with the dropdown JavaScript plugin.

-

Example

-

Toggleable, contextual menu for displaying lists of links. Made interactive with the dropdown JavaScript plugin.

+

Example

+

Wrap the dropdown's trigger and the dropdown menu within .dropdown, or another element that declares position: relative;. Then add the menu's HTML.

-<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
-  <li><a tabindex="-1" href="#">Action</a></li>
-  <li><a tabindex="-1" href="#">Another action</a></li>
-  <li><a tabindex="-1" href="#">Something else here</a></li>
-  <li class="divider"></li>
-  <li><a tabindex="-1" href="#">Separated link</a></li>
-</ul>
-
- -

Markup

-

Looking at just the dropdown menu, here's the required HTML. You need to wrap the dropdown's trigger and the dropdown menu within .dropdown, or another element that declares position: relative;. Then just create the menu.

- -
 <div class="dropdown">
   <!-- Link or button to toggle dropdown -->
-  <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
+  <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
     <li><a tabindex="-1" href="#">Action</a></li>
     <li><a tabindex="-1" href="#">Another action</a></li>
     <li><a tabindex="-1" href="#">Something else here</a></li>
@@ -149,9 +137,6 @@
 </div>
 
-

Options

-

Align menus to the right and add include additional levels of dropdowns.

-

Aligning the menus

Add .pull-right to a .dropdown-menu to right align the dropdown menu.

@@ -190,8 +175,7 @@
             

Button groups

-

Examples

-

Two basic options, along with two more specific variations.

+

Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with our buttons plugin.

Single button group

Wrap a series of buttons with .btn in .btn-group.

@@ -254,15 +238,21 @@ </div>
+

Justified button groups

+

Make a group of buttons stretch at the same size to span the entire width of its parent. This only works with <a> elements as the <button> doesn't pick up these styles.

+
+
+ Left + Right + Middle +
+
+
+<div class="btn-group btn-group-justified">
+  ...
+</div>
+
-
- - -

Checkbox and radio flavors

-

Button groups can also function as radios, where only one button may be active, or checkboxes, where any number of buttons may be active. View the JavaScript docs for that.

- -

Dropdowns in button groups

-

Buttons with dropdowns must be individually wrapped in their own .btn-group within a .btn-toolbar for proper rendering.

-- cgit v1.2.3