Skip to main content

Hit Preview

Role attribute

Every instance of this component carries:

Add this attribute
Namewf-algolia-element
Valuehit-preview
Required3 attributes
IndexRequired

Algolia index this preview queries.

Accepts e.g. acme_blog_prod

FieldRequired

Facet field the preview is scoped to (e.g. "category").

ValueRequired

Facet value the preview filters on (e.g. "Shoes").

Accepts e.g. Shoes

Optional2 attributes
Hits per preview

Maximum hits to render inside the preview (default 5).

Accepts min 1, whole numbers

Hit link template

URL template applied to each previewed hit (e.g. "/blog/{slug}").

Accepts e.g. /blog/{slug}