Skip to content
Enact

limestone/Dropdown

Limestone styled Dropdown components

Loading Live Preview

A Limestone Dropdown component.

By default, Dropdown maintains the state of its selected property. Supply the defaultSelected property to control its initial value. If you wish to directly control updates to the component, supply a value to selected at creation time and update it in response to onSelect events.

Extends: limestone/Dropdownlimestone/Dropdown.DropdownBase

A stateless Dropdown component.

Extends: limestone/Buttonlimestone/Button.Button
Extends: limestone/ContextualPopupDecoratorlimestone/ContextualPopupDecorator.ContextualPopupDecorator

Properties

The "aria-label" for the Dropdown.


Array(String)Array(any)

Items to be displayed in the Dropdown when open.

Takes either an array of strings or an array of objects. When strings, the values will be used in the generated components as the readable text. When objects, the properties will be passed onto an Item component; children as well as a unique key properties are required.


'above''below'

Placement of the Dropdown.

Default: 'below'

Disables Dropdown, making it non-interactive.


Called when the Dropdown is closing.


Called when the Dropdown is opening.


Called when an item is selected.

The event payload will be an object with the following members:

  • data - The value for the option as received in the children prop

  • selected - Number representing the selected option, 0 indexed


Displays the items.

Default: false

Text displayed in the Dropdown when nothing is selected.

The placeholder will be replaced by the selected item.

Default: 'No Selection'

Index of the selected item.


'large''small'

The size of the Dropdown's limestone/Buttonlimestone/Button.Button component.

Default: 'large'

Primary title text of the Dropdown.


'huge''large''x-large''medium''small''tiny'number

Width of the Dropdown.

Default: 'large'

Applies Limestone specific behaviors and functionality to limestone/Dropdownlimestone/Dropdown.DropdownBase.

Includes: ui/Changeableui/Changeable.Changeable
Includes: ui/Toggleableui/Toggleable.Toggleable
Includes: spotlight/SpotlightContainerDecoratorspotlight/SpotlightContainerDecorator.SpotlightContainerDecorator

Properties added to wrapped component

Displays the items.

Default: false

Index of the selected item.


The initial selected index when selected is not defined.