Components · Forms · Expanding Search
Back to Expanding SearchExpanding SearchNew
Use for header or toolbar search where a full field would crowd the layout - an icon that morphs into a search field with grouped results.
Properties
Size, corner radius and the content options below are properties of the same component, not separate elements - change them to check this component's appearances and states in the Live Preview.
Live Preview
Every appearance side by side, each in every state. One full matrix is rendered per selected Size and Corner radius combination.
When to use
Header or toolbar search where a full field would crowd the layout.
Component Guide
Overview
Expanding Search is an icon button that morphs into a search field with grouped, highlighted results beneath it. Filtering is local; suggestions such as recent searches show before anything is typed.
When to Use
- Header or toolbar search where a full field would crowd the layout.
- Quick navigation across local items with grouped results and recent suggestions.
When Not to Use
- Filtering a visible list in place - use Search.
- Setting a form value - use Combobox.
- App-wide commands - use a command palette.
Best Practices
- Place it where the field can grow into free space.
- Pass pre-filtered or server results for large data sets.
- Use the anchor to grow away from the edge it sits on.
Accessibility
- The field is role=combobox with listbox results in labelled groups.
- Enter or Space on the icon expands; Escape folds; ArrowUp/ArrowDown move through results.
- Counts and empty states are announced politely.
Related Components
Search, Combobox, Autocomplete.
{
"component": "Expanding Search",
"category": "Forms",
"summary": "Expanding Search is an icon button that morphs into a search field with grouped, highlighted results beneath it. Filtering is local; suggestions such as recent searches show before anything is typed.",
"whenToUse": [
"Header or toolbar search where a full field would crowd the layout.",
"Quick navigation across local items with grouped results and recent suggestions."
],
"whenNotToUse": [
"Filtering a visible list in place - use Search.",
"Setting a form value - use Combobox.",
"App-wide commands - use a command palette."
],
"bestPractices": [
"Place it where the field can grow into free space.",
"Pass pre-filtered or server results for large data sets.",
"Use the anchor to grow away from the edge it sits on."
],
"accessibility": [
"The field is role=combobox with listbox results in labelled groups.",
"Enter or Space on the icon expands; Escape folds; ArrowUp/ArrowDown move through results.",
"Counts and empty states are announced politely."
],
"relatedComponents": [
"Search",
"Combobox",
"Autocomplete"
]
}