# smootify-search

> Predictive search: products and query suggestions as the customer types, in a popover. The search field is input[name="query"]; without one, the only text field (2.0), whatever its `name`, is named query. A results popover (2.0) opens as the customer types, and also on a focus or click of the field, empty or not, so search-no-query shows its suggestions.

Status: Ready (Smootify 2.0)  
Add-on: Predictive Search  
URL: https://www.smootify.io/docs/astro/reference/elements/smootify-search  
Updated: 2026-10-21

## Where it can go

- **Anywhere** on the page.
- **Must contain one of** `input[name="query"]`, `input[type="text"]`, `input[type="search"]`, `input:not([type])`.
- **Out of place,** it stays in the page and does nothing: without a text field, or with two and none named query.

## What it requires

- The **Predictive Search** extension (lite or server plan, or the extension activated in the Smootify dashboard). Without it, the element does nothing.

## Fields in the form

Each field’s `name` attribute tells Smootify what the field holds.

| Name | Field | What it does |
|---|---|---|
| `query` | `input type="text"` input | The search text. |

## Attributes on the element

- **It reads** `limit`.

## Attributes inside it

| Group | Attribute name | Values |
|---|---|---|
| [Predictive search](https://www.smootify.io/docs/astro/reference/attributes/predictive-search) | `search` | 12 |

## Loading

Its code loads only on pages that have `smootify-search`.
