Skip to content
Calm motion: animations on this site only fade, with no movement

Input ​

Text-like input

One line of text. Multi-line is Textarea. A number with step and format is InputNumber. A fixed pattern is InputMask. A secret is PasswordInput. A list of values is InputTags. A value people mostly read and only sometimes change (a title, a name) is Inplace: text until clicked, then this field, with no separate edit screen.

Basic

as shown on the credits

Sizes
¥
⌘K
States
  • In a form, wrap it in a Field: that gives the label, description and error, and wires them. Input's own description and error are for a label-less input: a search box, an inline edit with aria-label.
  • #prefix / #suffix sit inside the plate (a unit, a shortcut hint). Things beside it (a button, https://) are InputGroup.
  • type passes through: email, url, search, tel get the right keyboard on phones. type="number" works, but InputNumber has the stepper and locale formatting.

Usage ​

ts
import { BlessInput } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
idstring—
typestring"text"
size"md" | "sm" | "lg""md"
invalidboolean—
disabledboolean—
readonlyboolean—
descriptionstring—text under the field; also wired via aria-describedby
errorstring—error text; sets aria-invalid
modelValuestring | number""

Events

NamePayloadDescription
update:modelValue[value: string | number]

Slots

NameScopeDescription
prefix—
suffix—

Released under the MIT License. Character names and artwork belong to their owners.