Skip to content

FloatingLabel ​

Input with a label that animates upward on focus or when the field has a value.

Default ​

The label sits inside the field at rest and floats to the top-left on focus.

Tailwind v4
vue
<FloatingLabel v-model="email" label="Email address" />

Pre-filled value ​

When modelValue is set the label is already in the floated position.

Tailwind v4
vue
<FloatingLabel v-model="name" label="Full name" />

Password field ​

Pass any valid <input> type through the type prop.

Tailwind v4
vue
<FloatingLabel v-model="password" label="Password" type="password" />

Error state ​

Tailwind v4
vue
<FloatingLabel v-model="email" label="Email address" :error="errors.email" />

Disabled ​

Tailwind v4
vue
<FloatingLabel v-model="username" label="Username" :disabled="true" />

Props ​

PropTypeDefaultDescription
modelValuestring—Input value (use with v-model)
labelstringrequiredThe floating label text
typestring'text'Native input type
disabledbooleanfalseDisables the input
errorstring—Error message below the input
idstringautoExplicit id for the input (auto-generated if omitted)

Events ​

EventPayloadDescription
update:modelValuestringEmitted on every keystroke

Private — Jetpack Labs internal use only