lightning:combobox is an input element that enables single selection from a list of options. The result of the selection is displayed as the value of the input.
This component inherits styling from combobox in the Lightning Design System.
This example creates a list of options during init with a default selection.
<aura:component>
<aura:attribute name=”statusOptions” type=”List” default=”[]”/>
<aura:handler name=”init” value=”{! this }” action=”{! c.loadOptions }”/>
<lightning:combobox aura:id=”selectItem” name=”status” label=”Status”
placeholder=”Choose Status”
value=”new”
onchange=”{!c.handleOptionSelected}”
options=”{!v.statusOptions}”/>
</aura:component>