Skip to content
Hekana Spray
Documentation
Getting started
Theme development
Components and tags

Localization

Apps and custom code

Examples and recipes
API reference
Publishing
Build apps
AI development

<hk-search-form>

hk-search-form: The store search form with placeholder, label and button text. Syntax, props, defaults and examples.

On this page

The store search form with placeholder, label and button text.

Group: Navigation and forms. Name in the editor: Search form. Complete props for every tag: Tag reference.

Syntax

html
<hk-search-form />

Children: None. The tag is self-closing.

Props

Write props as kebab-case attributes.

PropTypeRequiredDefaultAllowed valuesEditor label
placeholdertextno--Placeholder
labeltextno""-Label
button-labeltextno--Button text
show-labelbooleannofalse-Show label
iconbooleannotrue-Search icon

Required props

None. Every prop has a default or can be left out.

Examples

From packages/templates-default/theme/sections/header.snf, lines 47 to 47:

html
<div class="sf-search-panel"><hk-search-form placeholder="{{ t('search_placeholder') }}" />

From packages/templates-default/theme/sections/not-found.snf, lines 13 to 13:

html
<div class="sf-search-page-form"><hk-search-form placeholder="{{ t('search_placeholder') }}" />

Limits and security

  • The form is fixed: a theme cannot set a method, add fields or add hidden inputs.
  • hk-button: A button or link with a label, destination, variant, size and optional icon.
  • hk-pagination: Page links for a paginated list.

Next steps