--- title: Dropdown layout: documentation doc-tab: components doc-subtab: dropdown breadcrumb: - home - documentation - components - components-dropdown meta: colors: false sizes: false variables: true --- {% capture dropdown_example %} {% endcapture %} {% capture dropdown_content_example %} {% endcapture %} {% capture dropdown_click_example %} {% endcapture %} {% capture dropdown_info_example %} {% endcapture %} {% capture dropdown_left_example %} {% endcapture %} {% capture dropdown_right_example %} {% endcapture %} {% capture dropdown_up_example %} {% endcapture %}

The dropdown component is a container for a dropdown button and a dropdown menu.

{% include elements/snippet.html content=dropdown_example %} {% include elements/anchor.html name="Dropdown content" %}

While the dropdown-item can be used as an anchor link <a>, you can also use a <div> and insert almost any type of content.

{% include elements/snippet.html content=dropdown_content_example %} {% include elements/anchor.html name="Hoverable or Toggable" %}

The dropdown component has 2 additional modifiers

While the CSS :hover implementation works perfectly, the is-active class is available for users who want to control the display of the dropdown with JavaScript.

{% include elements/snippet.html content=dropdown_click_example more=true %} {% include elements/snippet.html content=dropdown_info_example more=true %} {% include elements/anchor.html name="Right aligned" %}

You can add the is-right modifier to have a right-aligned dropdown.

{% include elements/snippet.html content=dropdown_left_example more=true %} {% include elements/snippet.html content=dropdown_right_example more=true %} {% include elements/anchor.html name="Dropup" %}

You can add the is-up modifier to have a dropdown menu that appears above the dropdown button.

{% include elements/snippet.html content=dropdown_up_example more=true %} {% include components/variables.html type='component' %}