mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-14 11:14:24 +00:00
164 lines
4.1 KiB
HTML
164 lines
4.1 KiB
HTML
---
|
|
layout: documentation
|
|
doc-tab: components
|
|
doc-subtab: dropdown
|
|
---
|
|
|
|
{% capture dropdown_example %}
|
|
<div class="dropdown">
|
|
<div class="dropdown-trigger">
|
|
<a class="button">
|
|
<span>Dropdown button</span>
|
|
<span class="icon is-small">
|
|
<i class="fa fa-angle-down"></i>
|
|
</span>
|
|
</a>
|
|
</div>
|
|
<div class="dropdown-menu">
|
|
<div class="dropdown-content">
|
|
<a class="dropdown-item">
|
|
Dropdown item
|
|
</a>
|
|
<a class="dropdown-item">
|
|
Other dropdown item
|
|
</a>
|
|
<hr class="dropdown-divider">
|
|
<a class="dropdown-item">
|
|
With a divider
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture dropdown_click_example %}
|
|
<div class="dropdown">
|
|
<div class="dropdown-trigger">
|
|
<a class="button is-primary">
|
|
<span>Click me</span>
|
|
<span class="icon is-small">
|
|
<i class="fa fa-angle-down"></i>
|
|
</span>
|
|
</a>
|
|
</div>
|
|
<div class="dropdown-menu">
|
|
<div class="dropdown-content">
|
|
<a class="dropdown-item">
|
|
Overview
|
|
</a>
|
|
<a class="dropdown-item">
|
|
Modifiers
|
|
</a>
|
|
<a class="dropdown-item">
|
|
Grid
|
|
</a>
|
|
<a class="dropdown-item">
|
|
Form
|
|
</a>
|
|
<a class="dropdown-item">
|
|
Elements
|
|
</a>
|
|
<a class="dropdown-item">
|
|
Components
|
|
</a>
|
|
<a class="dropdown-item">
|
|
Layout
|
|
</a>
|
|
<hr class="dropdown-divider">
|
|
<a class="dropdown-item">
|
|
More
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% capture dropdown_info_example %}
|
|
<div class="dropdown is-hoverable">
|
|
<div class="dropdown-trigger">
|
|
<a class="button is-info">
|
|
<span>Hover me</span>
|
|
<span class="icon is-small">
|
|
<i class="fa fa-angle-down"></i>
|
|
</span>
|
|
</a>
|
|
</div>
|
|
<div class="dropdown-menu">
|
|
<div class="dropdown-content">
|
|
<div class="dropdown-item">
|
|
<p>You can insert <strong>any type of content</strong> within the dropdown menu.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endcapture %}
|
|
|
|
{% include subnav-components.html %}
|
|
|
|
<section class="section">
|
|
<div class="container">
|
|
|
|
<div class="columns" style="margin-bottom: -0.75rem !important;">
|
|
<div class="column">
|
|
<h1 class="title">Dropdown</h1>
|
|
<h2 class="subtitle">
|
|
An interactive <strong>dropdown menu</strong> for discoverable content
|
|
</h2>
|
|
</div>
|
|
|
|
<div class="column is-narrow">
|
|
<p class="content">
|
|
<span class="tag is-success">New!</span>
|
|
<span class="tag is-info">0.4.4</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="content">
|
|
<p>
|
|
The <code>dropdown</code> component is a container for a dropdown button and a dropdown menu.
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<code>dropdown</code> the <strong>main</strong> container
|
|
<ul>
|
|
<li>
|
|
<code>dropdown-trigger</code> the container for a <code>button</code>
|
|
</li>
|
|
<li>
|
|
<code>dropdown-menu</code> the toggable menu, <strong>hidden</strong> by default
|
|
<ul>
|
|
<li>
|
|
<code>dropdown-content</code> the dropdown <strong>box</strong>, with a white background and a shadow
|
|
<ul>
|
|
<li>
|
|
<code>dropdown-item</code> each <strong>single item</strong> of the dropdown, which can either be a <code>a</code> or a <code>div</code>
|
|
</li>
|
|
<li>
|
|
<code>dropdown-divider</code> a <strong>horizontal line</strong> to separate dropdown items
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="columns">
|
|
<div class="column is-half">
|
|
{{dropdown_example}}
|
|
</div>
|
|
<div class="column is-half highlight-full">
|
|
{% highlight html %}{{dropdown_example}}{% endhighlight %}
|
|
</div>
|
|
</div>
|
|
|
|
{{dropdown_click_example}}
|
|
{{dropdown_info_example}}
|
|
</div>
|
|
</section>
|