Input field

A batteries-included field: label, input, hint and error.

We'll never share it.

With error

API reference

Inputs

PropTypeDefaultDescription
labelstring''Visible label. When empty, pass `aria-label` for an accessible name.
hintstring''Helper text shown below the control while there is no error.
errorstring''Error message; when set, the control is marked invalid and this replaces the hint.
typestring'text'Native input type (`text`, `email`, `password`, `number`, …).
placeholderstring''Placeholder shown when the field is empty.
requiredbooleanfalseWhether the field is required (adds a marker and the `required` attribute).
size"default" | "lg" | "sm"'default'Size preset controlling input height, padding and text size.
namestring''Native `name` attribute.
autocompletestring''Native `autocomplete` attribute.
inputmodestring''Native `inputmode` attribute.
aria-labelstring''Accessible name applied to the input when there is no visible `label`.

Two-way models

Bind with [(name)], or one-way as an input.

PropTypeDefaultDescription
valuestring''The field value. Two-way bindable with `[(value)]`.
disabledbooleanfalseWhether the field is disabled. Two-way bindable with `[(disabled)]`.

Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.