Skip to content

Input ​

Input is a styled text input with v-model support, error/hint messaging, and disabled state.

Basic usage ​

Tailwind v4
vue
<Input v-model="name" placeholder="Enter your name" />

With label (use FormGroup) ​

For labeled inputs use FormGroup — it wires the for/id relationship and handles error/hint display consistently:

Tailwind v4
vue
<FormGroup label="Full name" for="fullname" required>
  <Input id="fullname" v-model="name" placeholder="Jane Smith" />
</FormGroup>

Error state ​

Pass an error string to show a danger-colored border and error message below the input:

Tailwind v4
vue
<Input v-model="email" type="email" :error="errors.email" />

Hint text ​

Tailwind v4
vue
<Input v-model="slug" hint="Only lowercase letters, numbers, and hyphens." />

Note: error takes precedence over hint — if both are provided only the error is shown.

Disabled ​

Tailwind v4
vue
<Input v-model="value" :disabled="true" />

Input types ​

The type prop maps directly to the native <input> type:

Tailwind v4
vue
<Input v-model="password" type="password" />
<Input v-model="count" type="number" />
<Input v-model="date" type="date" />

Props ​

PropTypeDefaultDescription
modelValuestring | number—Value (use with v-model)
typestring'text'Native input type
placeholderstring—Placeholder text
errorstring—Error message — shows danger border + text below
hintstring—Hint text below the input (hidden when error is set)
disabledbooleanfalseDisables the input

Events ​

EventPayloadDescription
update:modelValuestringEmitted on every keystroke

Private — Jetpack Labs internal use only