AUI Documentation

Dropdown

Ask a question

Summary

Dropdown2 creates a dropdown menu, with optional sections, headings, icons, checkbox items, radio group items and disabled items. Submenus are supported but should be avoided where possible for usability reasons.

Status

API status: experimental
Included in AUI core? Not in core You must explicitly require the web resource key.
Web resource key: com.atlassian.auiplugin:aui-dropdown2
AMD Module key: N/A
Experimental since: 5.9

Examples

Attributes

Components Attribute Description
aui-dropdown-menu src A URL the component will fetch JSON from in order to template the dropdown's contents.
aui-section label The text that will appear in the heading of a dropdown section.
aui-item-link, aui-item-checkbox, aui-item-radio interactive If set, the dropdown item will not close when clicked.
aui-item-link, aui-item-checkbox, aui-item-radio disabled If set, the dropdown item will not be selectable by the user.
aui-item-checkbox, aui-item-radio checked If set, the dropdown item will be selected.
aui-item-link for The id of another dropdown that this link will open as a submenu.

Remote dropdown

A dropdown's contents can be fetched from a URL providing JSON that matches the following specification.

The core structure of this JSON is a list of sections, each section containing an optional label property and a mandatory items property.

The items array closely reflects the markup pattern – the type property corresponds to a tagname, and the attributes are listed as properties of the same name, as listed in the attributes table. Boolean attributes must take a value of true or false, otherwise the value of each property will be inserted into the corresponding attribute directly.