Edu Calvo

Float Input

Forms 4

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>
  );
}

Dependencies

More by Edu Calvo

View all
  • Scrollable Card Stack

    Scrollable Card Stack

    275
  • Pixel Flow Field

    Pixel Flow Field

    199
  • AI Task List

    AI Task List

    190
  • Siri Orb

    Siri Orb

    186
  • Cursor Follow

    Cursor Follow

    165
  • Gravity Stars

    Gravity Stars

    157
  • Agent Avatar

    Agent Avatar

    147
  • Coverflow Carousel

    Coverflow Carousel

    142

More in Forms

View all
  • Login 1

    Login 1

    64
  • Premium Auth

    Premium Auth

    571
  • Contact Card

    Contact Card

    1.1K
  • Form

    Form

    18
  • Book A Demo 1

    Book A Demo 1

    91
  • Authentication Card

    Authentication Card

    52
  • Card Studio

    Card Studio

    47
  • Login Card

    Login Card

    35