Search field
Component preview
A text input inside a named search form that submits a query to find matching content.
Build pack
Choose the task and destination. Technical names stay in English.
In your own words
Documented aliases: search box, query field, site search
Try it
Compare all three behaviors
Shared comparison scenario: A form collects text, with field length and submission intent determining the appropriate input control.
This context stays fixed. Switch concepts to observe the mission, edge case, and specimen specific to each behavior.
Search field
Search field submits a query; Text field edits a general value, while Textarea accepts multiline content.
Your task
Search for dialog, submit the query, then open one of the displayed concept results.
Edge case to verify
A query with no match shows an explicit empty result, while the simulated failure preserves the input and offers Retry.
Mission
Search for dialog, submit the query, then open one of the displayed concept results.
Select a marker directly on the specimen, or use the list below, to see its role. Hide the markers to operate the lab without obstruction.
Label
The persistent text that names a control or field.
Submit a query
Enter submits the current query through a named search form without changing the field pattern.
Clear the query
The clear control empties the query, keeps focus in the field, and updates results predictably.
Explain validation
A specific inline message identifies the invalid field and explains how to correct it.
Search idle with an empty query
Search idle with an empty query
Search query ready to submit
Search query ready to submit
Search loading
Search loading
Search results visible
Search results visible
No search results
No search results
Search error
Search error
Search result opened
Search result opened
Search idle with an empty query → Search query ready to submit
Typing meaningful search terms reveals the clear control and prepares explicit submission.
Search query ready to submit → Search loading
Enter or the visible Search action starts one request and blocks duplicate submission.
Search loading → Search results visible
The request finishes with matching concepts and exposes their result buttons.
Search loading → No search results
The request finishes without a match and exposes the explicit No concept found state.
Search loading → Search error
The simulated error query fails while preserving the input and exposing Retry with an example.
Search error → Search loading
Retry with an example replaces the query with keyboard shortcuts and starts one new request.
Search results visible → Search result opened
Activating a result marks that concept as opened in the demonstration.
Search results visible → Search query ready to submit
Editing the submitted query marks it ready for a new explicit search.
Search query ready to submit → Search idle with an empty query
The clear control removes the query while preserving focus in the search field.
Search results visible → Search idle with an empty query
The clear control removes the submitted query and results while preserving field focus.
No search results → Search idle with an empty query
The clear control removes the unmatched query and preserves focus in the field.
Search result opened → Search loading
Submitting after opening a result clears the opened-result status and starts the current query.
No search results → Search query ready to submit
Editing an unmatched submitted query removes the empty result and prepares a new search.
Search error → Search query ready to submit
Editing the failed query removes the error and prepares explicit resubmission.
Search loading → Search query ready to submit
Editing during loading cancels the pending result update and prepares the changed query.
Search loading → Search idle with an empty query
Clear during loading cancels the pending result update, empties the query, and preserves focus.
Search error → Search idle with an empty query
Clear removes the failed query and error while preserving focus in the field.
Search result opened → Search idle with an empty query
Clear removes the query, results, and opened-result status while preserving field focus.
form[role=search] with input[type=search]
Equivalence caveat: A plain search field submits a query. Once it presents selectable filtered suggestions, the interaction becomes a Combobox.
Verify binding sourceWHATWG · standard · 2026-07-16
Claim covered: Search field: native input types, labeling, state, validation, and form participation.
WHATWG · standard · 2026-07-16
Claim covered: Search field: native form controls, labels, submission, validation, and disabled-state behavior.
Verified on 2026-07-16 · rev. 1