About
A text input with an animated floating label that moves above the field on focus or when filled, with optional leading icon support.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Float Input to your project and fits it to your theme.
Code
How Float Input is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import FloatInput from "@/components/ui/float-input";
import { Mail } from "lucide-react";
import { useState } from "react";
export default function FloatInputDemo() {
const [email, setEmail] = useState("");
return (
<div className="flex items-center justify-center p-8">
<div className="w-full max-w-sm">
<FloatInput
icon={<Mail className="h-4 w-4 text-gray-400" />}
label="Email Address"
onChange={setEmail}
placeholder="Enter your email"
value={email}
/>
</div>
</div>
);
}














