<m-option> 1 SLOTS 6 PROPS
overview examples properties methods events slots css parts

A selectable option within list-based components (m-listbox, m-combobox, etc). Represents a single option that can be selected, focused, and disabled.

Basic Usage

Apple Pear Orange (out of stock)
Code
<m-listbox name="fruit">
  <m-option value="apple">Apple</m-option>
  <m-option value="pear" selected>Pear</m-option>
  <m-option value="orange" disabled>Orange (out of stock)</m-option>
</m-listbox>
NAMETYPEDEFAULT
value string ''
The value associated with this item. This value is submitted with the form when the item is selected.
selected boolean false
Whether this item is currently selected.
focused boolean false
Whether this item has virtual keyboard focus. Managed by the parent m-list-box component.
disabled boolean false
Whether this item is disabled and cannot be selected.
_internals ElementInternals
adoptedStyleSheets array [baseStyleSheet]
NAMERETURNS
render void
NAMEDETAIL TYPE
NAME
(default)
The default slot contains the visible content of the option
NAME
Open palette