<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
<hk-search-form />Children: None. The tag is self-closing.
Props
Write props as kebab-case attributes.
| Prop | Type | Required | Default | Allowed values | Editor label |
|---|---|---|---|---|---|
placeholder | text | no | - | - | Placeholder |
label | text | no | "" | - | Label |
button-label | text | no | - | - | Button text |
show-label | boolean | no | false | - | Show label |
icon | boolean | no | true | - | 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:
<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:
<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.
Related tags
hk-button: A button or link with a label, destination, variant, size and optional icon.hk-pagination: Page links for a paginated list.
