Float Label

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/input-float-label

About this component

The label lives inside the field at rest and floats above the text on focus or when a value is present. Pure CSS transitions, no dependencies.

Triggers

  • Focus
  • State change

Techniques

  • Transform only
  • Transition delay stagger

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

Label is a real <label> with htmlFor: screen readers see it correctly at all times.

Use it in anything you build, commercial and client work included. Licence

More inputs

See all
Glitch ErrorGet code
Gradient RingGet code