Overview
Use SearchField to find content in a page, collection, or remote data set when the application owns result retrieval and presentation.
Project search
Edit the query, press Enter, clear it, or use the explicit submit control.
Anatomy
SearchField combines a search affordance, editable query, clear and optional submit controls, plus guidance or live result context.
- 1Search icon
Identifies the field purpose without replacing its label.
- 2Query input
Captures free-form search terms.
- 3Clear control
Empties a non-empty query and retains focus.
- 4Submit control
Explicitly runs search when needed.
- 5Search context
Shows guidance and a live result summary.
When to use
Use SearchField when people know terms that identify content and results are presented elsewhere.
Recommended
- Search a collection
Find projects, people, events, or records using recognizable terms.
- Submit remote queries
Use explicit submission when requests are expensive or intentional.
- Summarize results
Keep a concise result count connected to the current query.
When not to use
Use a selection or command pattern when the field must own suggestions or trigger application actions.
Avoid
- Do not select values
Use Combobox when a result becomes a form value.
- Do not execute commands
Use CommandBar for searchable actions and navigation.
- Do not replace filters
Use FilterBar for structured facets and governed conditions.
Variants
Three treatments and sizes let SearchField fit standalone pages, grouped forms, and compact productivity surfaces.
Outlined
Default boundary for independent search.
Filled
Tonal field within grouped surfaces.
Underlined
Restrained treatment for embedded search.
Sizes
Small, medium, and large maintain predictable controls.
States
SearchField coordinates query entry and resolution feedback while applications own the result lifecycle.
| State | Trigger | Visual response | Interaction |
|---|---|---|---|
| Empty | No query | Search icon and placeholder | Ready for input |
| Populated | Query entered | Query and clear control | Edit, clear, or submit |
| Focused | Input receives focus | Primary border and ring | Text entry active |
| Loading | Search resolving | Progress icon | Query remains visible |
| Results | Response available | Live result summary | Results remain application-owned |
| Disabled | Search unavailable | Reduced emphasis | Not operable |
Behavior
SearchField owns query mechanics while debouncing, network requests, routing, result ranking, and analytics remain application concerns.
Submit
Enter and the optional submit control call onSearch.
Clear
Escape or clear empties a populated query and restores input focus.
Progress
Loading replaces clear with a non-blocking progress indicator.
Result summary
Result text uses a polite live status.
Accessibility
SearchField retains native search input behavior with persistent labeling and connected search feedback.
| Key | Action |
|---|---|
| Enter | Submits the current query. |
| Esc | Clears a populated query when clearable. |
| Tab | Moves through input and visible action controls. |
- Provide a visible label or an explicit aria-label.
- Name clear and submit controls independently from their icons.
- Announce result counts politely without moving focus.
- Do not announce loading continuously during every keystroke.
- Keep result content after the field in a logical reading order.
- Use Combobox semantics instead when suggestions are selectable.
Content guidelines
Labels, placeholders, and result summaries should communicate scope without prescribing overly specific queries.
Name the scope
Identify what can be searched.
Search projects
Offer useful terms
Describe supported identifiers in helper text.
Search by name, owner, or project ID.
Keep placeholders short
Use a natural prompt when the label is already visible.
Name or project ID
Quantify results
Use concise localized summaries.
24 results
Examples
Controlled state supports remote search while loading and result feedback remain aligned with the query.
Remote audit search
Props / API
SearchField extends native input attributes except values, change, type, and size replaced by its controlled API.
Props