Input
Input collects text with sizes aligned to Button, plus password, textarea, clearable, prefix/suffix, status, and round.
Demos
Basic
Bind
value and listen for input with e.detail.value. Value: (empty)
Size
Sizes match Button:
sm, md, and lg. Password
type="password" adds a show/hide toggle in the suffix area. Textarea
type="textarea" renders a multi-line control; set rows for height. Clearable
clearable shows a clear control when the value is non-empty and the field is interactive. Prefix / suffix
Use the
prefix and suffix slots for adornments. Built-in clear and password toggle render after the suffix slot. Status
Validation feedback via
status: success, warning, or error. Round
Set
round for a fully rounded field. Disabled / readonly
disabled blocks interaction; readonly keeps focus but prevents edits. API
Input Props
| Prop | Type | Default |
|---|---|---|
type | 'text' | 'password' | 'textarea' | 'text' |
size | 'sm' | 'md' | 'lg' | 'md' |
value | string | '' |
placeholder | string | '' |
disabled | boolean | false |
readonly | boolean | false |
clearable | boolean | false |
round | boolean | false |
status | 'success' | 'warning' | 'error' | '' | '' |
rows | number | 3 |
name | string | '' |
Input Slots
| Name | Description |
|---|---|
prefix | Leading adornment |
suffix | Trailing adornment (before clear / password toggle) |
Input Events
| Name | Description |
|---|---|
input | Value changed (typing or clear); bubbles; composed: true; detail: { value: string } |
change | Native-style change (blur/commit or clear); bubbles; composed: true; detail: { value: string } |
CSS Parts
| Part | Description |
|---|---|
base | Outer surface |
input | Native <input> or <textarea> |
prefix | Prefix slot wrapper |
suffix | Suffix slot + built-in controls wrapper |
clear | Clear button |
password-toggle | Show/hide password button |