You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Adaptive Search Suggestions (Docked & Full-Screen Search View)
Slotting <md-menu-item> (or <md-list-item>) elements into <md-search> (or slot="suggestions") automatically renders an adaptive Search View that filters items as you type:
Medium & Expanded windows (>= 600px): Displays a docked M3 Expressive vertical menu surface directly beneath the search bar.
Compact windows (< 600px): Expands into a full-screen search view with a leading back button (<).
<md-searchplaceholder="Search your library"><md-menu-item><md-iconslot="start">animation</md-icon><divslot="headline">Animations</div></md-menu-item><md-menu-item><md-iconslot="start">location_on</md-icon><divslot="headline">Munich</div></md-menu-item></md-search>
Properties and Attributes
Property
Attribute
Type
Default
Description
value
value
string
''
Current search query value.
placeholder
placeholder
string
'Search'
Supporting / hint text displayed when the input is empty.
label
label
string
'Search'
Accessible aria-label for the search input.
name
name
string
''
Input name attribute for form submission.
disabled
disabled
boolean
false
Whether the search bar is disabled.
centerAligned
center-aligned
boolean
false
Center-aligns the supporting / hint text when unfocused/empty.
elevated
elevated
boolean
false
Applies resting elevation (level 3) to the search container.
noClear
no-clear
boolean
false
Hides the automatic clear (close) button when text is typed.
noFilter
no-filter
boolean
false
Disables automatic filtering of slotted suggestion items on input.
open
open
boolean
false
Whether the search suggestions/results view is open.