0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Bootstrap/docs/components/button-dropdown.md
Mark Otto e558f490dd Rewrite dropdowns
- Remove nested > selectors for dropdown items
- Update docs examples to use all the new markup
2015-08-17 11:19:14 -07:00

14 KiB

layout title group
docs Button dropdown components

Use any button to trigger a dropdown menu by placing it within a .btn-group and providing the proper dropdown menu markup.

{% callout danger %}

Plugin dependency

Button dropdowns require the dropdown plugin to be included in your version of Bootstrap. {% endcallout %}

Contents

  • Will be replaced with the ToC, excluding the "Contents" header {:toc}

Single button dropdowns

Turn a button into a dropdown toggle with some basic markup changes.

{% highlight html %}

{% endhighlight %}

Split button dropdowns

Similarly, create split button dropdowns with the same markup changes, only with a separate button.

{% highlight html %}

{% endhighlight %}

Sizing

Button dropdowns work with buttons of all sizes.

{% highlight html %}

Large button
...
Small button
...
Extra small button
...
{% endhighlight %}

Dropup variation

Trigger dropdown menus above elements by adding .dropup to the parent.

{% highlight html %}

Dropup Toggle Dropdown
{% endhighlight %}