Input

Data input

A text input (type text, email, number, password, search, date, file …) with bind:value, or bind:files for type="file". Inside a Field it takes its id, label, description, error and invalid and disabled state from the Field.

import { Input } from '@limerdev/zest';
Input for AI tools (llms.txt)
Use for
Single-line text and number entry, in a Field.
Don't
An Input without a label: wrap it in a Field with a Field.Label, or give it aria-label. type="checkbox" or type="radio". Multi-line text.

Examples

Types

Any text-like type. Outside a Field, name it with aria-label or a Label.

States

aria-invalid marks an input invalid; inside a Field, a Field.Error does it for you.

Props

Every part also takes class (merged over its defaults), ref (bindable: the element), children, and child (a snippet that renders your own element, with props to spread on it).

Input

Prop Type Default Description
files bindable FileList | null – The chosen files, for type="file". Bindable.
value bindable string | number | null – The text, or a number for type="number". Bindable.