Link @lit-material/tokens/css/index.css once per page for the colour, type and shape tokens. Install guide
API
<lit-material-select-option>
A single option within a lit-material-select. Not meaningful outside
that context.
Properties
Property
Attribute
Type
Default
Description
value
value
string
""
>
selected
selected
boolean
false
>
disabled
disabled
boolean
false
>
Slots
Slot
Description
default
The option's label.
leading
An optional leading icon, replaced by a checkmark when selected.
CSS parts
Part
Description
option
The row (background/padding).
ripple
The state-layer element the hover/press feedback is drawn on.
<lit-material-select>
Material Design 3 select — a button that opens a popup listbox of
lit-material-select-option elements, following the WAI-ARIA "select-only
combobox" pattern (https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/).
Properties
Property
Attribute
Type
Default
Description
variant
variant
SelectVariant
"filled"
>
label
label
string
""
>
value
value
string
""
>
name
name
string
""
>
required
required
boolean
false
>
disabled
disabled
boolean
false
>
error
error
boolean
false
>
errorText
error-text
string
""
>
supportingText
supporting-text
string
""
>
open
open
boolean
false
>
form
form
string | undefined
none
>
Events
Event
Description
change
Fires when the selected value changes via user interaction.
Slots
Slot
Description
default
lit-material-select-option elements.
CSS parts
Part
Description
trigger
The button that shows the current value and opens the listbox.
label
The floating label element.
listbox
The popup listbox surface.
supporting
The supporting-text row.
CSS custom properties
Property
Description
--lit-material-select-min-width
Smallest width (default 210px).
--lit-material-select-shape
Corner radius (default --md-sys-shape-corner-extra-small; filled rounds the top only).