Back to Components
Inputs

Floating Input

An input field with a label that floats up when focused or filled. Smooth animation provides a clean, modern form experience.

Dependencies

  • clsx
  • tailwind-merge

Files

  • components/ui/floating-input.tsx

Installation

Using shadcn CLI

npx shadcn add floating-input --url https://ui.hampton.io

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge