thegeneralyst/AnopaDocs
Catalog

Search Input

Search text field that syncs the query with the Anopa filter store, seeded from the ?q= URL parameter, with debounced updates.

Search Input

AP_SearchInput is a text field that syncs the search query into the filter store so AnopaCatalog updates in real time. On mount it reads the ?q= URL parameter and seeds the store automatically, so navigating to a search page with a pre-populated query works end-to-end with AP_SearchNavigator. Updates are debounced to reduce unnecessary filtering. A configurable search scope lets you choose which product fields the query runs against — title, tags, vendor, product type, description, or collections. An optional clear button appears when the field has a value. Input styling — font, colors, border, focus border, radius, and padding — is fully configurable from the panel.

Property Controls

ControlTypeDefaultDescription

Placeholder

String

Search products…

Placeholder text shown when the search input is empty.

Debounce

Number

300ms

Delay in ms before the search query is written to the filter store after typing stops. Range: 0–1000.

Clear on Esc

Boolean

true

When on, pressing Escape clears the search input and resets the query.

Show Clear ×

Boolean

true

When on, a clear button appears inside the field whenever it has a value.

Search Scope

Object

Which product fields the query searches against. Toggle each field on or off: Title (on by default), Tags, Vendor, Product Type, Description, Collections.

Input Style

Object

Visual styling for the input field: font, text color, placeholder color, background, border width, border color, focus border color, border radius, and padding.

Clear Button

Object

Styling for the clear × button: color and size in px. Hidden when Show Clear × is off.