Input
Single-line text. Use Textarea when the value can wrap, Combobox when it comes from a known list.
Sizes
Default in this port is 40px (also aliased as medium). small is 32px, large is 48px.
Prefix and suffix
String addons, icon slots, or both. prefix-styling and suffix-styling drop the tinted rail.
https://.com
vercel/
1
<Input placeholder="Default">
2
<template #prefix>
3
<Icon :icon="ArrowUp01Icon" :size="14" />
4
</template>
5
</Input>
7
<Input prefix="https://" suffix=".com" placeholder="example" />
9
<Input
10
prefix="vercel/"
11
:prefix-styling="false"
12
:suffix-styling="false"
13
:suffix-container="false"
14
placeholder="docs"
15
>
16
<template #suffix>
17
<Icon :icon="ArrowUp01Icon" :size="14" />
18
</template>
19
</Input>
Disabled
Error
error paints the border red and renders the message under the field.
Label
Passing label renders Label above the field and wires html-for for you.
1
<Input label="Project Name" placeholder="my-awesome-project" />
Rounded
rounded makes a pill. Pair it with prefix / suffix for domain-style fields.
Best practices
- One line of free-form text: names, domains, tokens. Multi-line → Textarea. Filter a known list → Combobox. Inline search → Search Input, not this field inside another form.
- Validate on blur. Pass a sentence to
error: "Project name is required." Skip "please". - Labels are short Title Case nouns. Placeholders are example values (
example.com), never instructions. - Keep the field focusable while saving.
disabledonly when typing is impossible. size="medium"matchesdefault(40px). New code can use either; product chrome often wantssmall.- Bind with
v-model. Native attributes (type,placeholder,autocomplete) fall through to the innerinput.