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
Enter a valid address
Sizes
¥
⌘K
States
- In a form, wrap it in a Field: that gives the label, description and error, and wires them. Input's own
descriptionanderrorare for a label-less input — a search box, an inline edit witharia-label. #prefix/#suffixsit inside the plate (a unit, a shortcut hint). Things beside it — a button,https://— are InputGroup.typepasses through:email,url,search,telget 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
| Name | Type | Default | Description |
|---|---|---|---|
id | string | — | |
type | string | "text" | |
size | "md" | "sm" | "lg" | "md" | |
invalid | boolean | — | |
disabled | boolean | — | |
readonly | boolean | — | |
description | string | — | text under the field; also wired via aria-describedby |
error | string | — | error text; sets aria-invalid |
modelValue | string | number | "" |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: string | number] |
Slots
| Name | Scope | Description |
|---|---|---|
prefix | — | |
suffix | — |