diff options
| author | Mark Otto <[email protected]> | 2015-08-17 18:18:37 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2015-08-17 18:18:37 -0700 |
| commit | 29b4031db5cdce170b817967e73f5fd5891a6545 (patch) | |
| tree | f6fb95e46fd0dfca09d5298b863e0c69bf107738 /docs/components/dropdowns.md | |
| parent | f6925475dc655f7f72cf1f078a52745acfe2348a (diff) | |
| download | bootstrap-29b4031db5cdce170b817967e73f5fd5891a6545.tar.xz bootstrap-29b4031db5cdce170b817967e73f5fd5891a6545.zip | |
allow <button> elements as .dropdown-item's
Diffstat (limited to 'docs/components/dropdowns.md')
| -rw-r--r-- | docs/components/dropdowns.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/components/dropdowns.md b/docs/components/dropdowns.md index c60cb6fdb..8b1ae7a67 100644 --- a/docs/components/dropdowns.md +++ b/docs/components/dropdowns.md @@ -28,6 +28,25 @@ Wrap the dropdown's trigger and the dropdown menu within `.dropdown`, or another </div> {% endexample %} +### Button elements + +You can optionaly use `<button>` elements in your dropdowns instead of `<a>`s. + +{% example html %} +<div class="dropdown open"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + Dropdown + </button> + <div class="dropdown-menu" aria-labelledby="dropdownMenu1"> + <button class="dropdown-item" type="button">Action</button> + <button class="dropdown-item" type="button">Another action</button> + <button class="dropdown-item" type="button">Something else here</button> + </div> +</div> +{% endexample %} + + + ## Alignment By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add `.dropdown-menu-right` to a `.dropdown-menu` to right align the dropdown menu. |
