Default buttons Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only and
Create block level buttons—those that span the full width of a parent— by adding .btn-block. Block level button Block level button buttons. Primary link Link Primary linkLink Heads up! We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. Also, this class is only for aesthetic; you must use custom JavaScript to disable links here. Button element Add the disabled attribute to , Link
Two basic options, along with two more specific variations.
Wrap a series of buttons with .btn
in .btn-group
.
Combine sets of <div class="btn-group">
into a <div class="btn-toolbar">
for more complex components.
Make a set of buttons appear vertically stacked rather than horizontally.
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.
Heads up! Buttons with dropdowns must be individually wrapped in their own .btn-group
within a .btn-toolbar
for proper rendering.
Use any button to trigger a dropdown menu by placing it within a .btn-group
and providing the proper menu markup.
Button dropdowns work at any size: .btn-large
, .btn-small
, or .btn-mini
.
Button dropdowns require the Bootstrap dropdown plugin to function.
In some cases—like mobile—dropdown menus will extend outside the viewport. You need to resolve the alignment manually or with custom javascript.
Building on the button group styles and markup, we can easily create a split button. Split buttons feature a standard action on the left and a dropdown toggle on the right with contextual links.
Utilize the extra button classes .btn-mini
, .btn-small
, or .btn-large
for sizing.
Dropdown menus can also be toggled from the bottom up by adding a single class to the immediate parent of .dropdown-menu
. It will flip the direction of the .caret
and reposition the menu itself to move from the bottom up instead of top down.
A pocos meses del Bicentenario y con las elecciones generales...