FormsFilterText
Searchastronomic.dev# FilterText
For the filters' text box, such as a street or a neighborhood.
Static: no JavaScript.
## Usage
```astro
import FilterText from "@astronomic-dev/ui/components/FilterText.astro";
```
## Examples
### Where
The search's text box. In Filters, it applies 300 ms after the last key, or at once on Enter.
```astro
---
import FilterText from "@astronomic-dev/ui/components/FilterText.astro";
---
<FilterText label="Where" placeholder="Street, neighborhood or listing number" class="max-w-md" />
```
## Props
### FilterText
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `string` | None | The text box's visible label ("Where"). |
| `placeholder` | `string` | None | The box's placeholder. |
| `value` | `string` | None | The box's text. |
| `id` | `string` | None | The input's id. Default: a page-unique id. |
| `class` | `string` | None | More classes for the Field, merged with cn(). |
Any other attribute goes on the Field's root. Filters renders it from textLabel and textPlaceholder.
## Accessibility
- A native search input named q in a Field, with a visible label. No autocomplete list, and a phone's Enter key says "search".
FilterText
FreeFor the filters' text box, such as a street or a neighborhood.
- File
- FilterText.astro
- Group
- Forms
- Kind
- Static: no JavaScript
- Examples
- 1
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Where
The search's text box. In Filters, it applies 300 ms after the last key, or at once on Enter.
Force statemain.astro
examples/filtertext/main.astro
---
import FilterText from "@astronomic-dev/ui/components/FilterText.astro";
---
<FilterText label="Where" placeholder="Street, neighborhood or listing number" class="max-w-md" />Minimal · Light