Back to library

Search field

Search and clear a query in a dedicated search control.

  • Transfer to Hana
  • Payment to Alex
  • Monthly savings

Recommended API

Property or elementTypeExample initial valueDescription
input[type="search"]Native search inputemptyCollect the query and filter the example result list.
ResetForm actionClearRestore the full list and empty the query.

States

StateTriggerResult
matchingEnter a query.Matching rows remain visible and the result count updates.
clearedActivate the reset button.The field clears and all rows return.

CSS variables

VariableTypeDefaultDescription
--q-textcolor #28302aMain text and foreground color.
--q-mutedcolor #70776fColor for secondary text.
--q-font-sizelength 13pxBase size for the component text.
--q-accentcolor #344e41Accent for active controls, indicators and focus.
--q-surfacecolor #ffffffSurface for controls and cards.
--q-bordercolor #dce0d8Color for outlines and dividers.
--q-radiuslength 10pxBase corner radius.
--q-gaplength calc(var(--q-space) * 2)Space between items, based on the spacing unit.
--q-control-pxlength calc(var(--q-space) * 4)Horizontal padding for controls.
--q-control-pylength calc(var(--q-space) * 2.5)Vertical padding for controls.
--q-spacelength 4pxBase unit for gaps and padding.