About
A text input whose label animates up into a reserved slot above the field instead of disappearing, with focus/invalid states, an optional hint line and a character counter.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Floating Label to your project and fits it to your theme.
Code
How Floating Label is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import { FloatingLabelInput } from "@/components/ui/floating-label";
export default function FloatingLabelDemo() {
return (
<div className="flex justify-center">
<div className="w-full max-w-[320px]">
<FloatingLabelInput
label="Account reference"
hint="Printed on the statement header."
maxLength={16}
/>
</div>
</div>
);
}
















