Skip to content
LyEve UI v0.60.1

Form controls

Input

A labeled text input with built-in label, hint, and error slots. Forwards every native HTML attribute, so things like autocomplete, type="number", and min/max work.

Basic

With a hint

At least 12 characters.

Error state

That email doesn't look right.

Described by text elsewhere

describedBy takes the ids of other elements that explain the input, separated by spaces. A screen reader reads them after the input's own hint or error. Use it when the explanation already sits on the page, such as a note above a form or the message a wrapping Field renders, so the text is not written twice.

The domain must point at this instance before it can be saved.

Without the protocol.

Required & disabled

API

PropTypeDefaultDescription
value string''Bindable input value.
label string no defaultFloating label rendered above the input.
type string'text'Native input type.
placeholder string no defaultNative placeholder.
hint string no defaultHelp text shown below the input.
error string no defaultError message. Replaces the hint and reddens the border.
describedBy string no defaultIds of other elements that describe the input, separated by spaces, such as a wrapping Field's message. Read after the input's own hint or error.
disabled booleanfalseDisable the input.
required booleanfalseAdd a red asterisk to the label.
id string no defaultThe input's id. Left out, it is a unique generated id. One passed in wins, and it is what a Label's for or a selector should aim at.
name string no defaultThe form field the value posts under.
mono booleanfalseSets the control alone in the monospace face, for a slug, a key or a locale tag.
class string no defaultExtra classes on the wrapper.
noAI booleanfalseKeep the value from an assistant: a FormAssist never reports it or fills it, and the control is marked data-no-ai for a browser agent.

Any other prop (e.g. autocomplete, min, maxlength) is forwarded to the underlying <input>.