Eduardo Calvo

Float Input

Forms 5

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 Eduardo Calvo

View all
  • Scrollable Card Stack

    Scrollable Card Stack

    301
  • Pixel Flow Field

    Pixel Flow Field

    222
  • Siri Orb

    Siri Orb

    204
  • AI Task List

    AI Task List

    203
  • Gravity Stars

    Gravity Stars

    186
  • Cursor Follow

    Cursor Follow

    164
  • Coverflow Carousel

    Coverflow Carousel

    161
  • Agent Avatar

    Agent Avatar

    161

More in Forms

View all
  • Form

    Form

    7
  • Login 2

    Login 2

    16
  • Contact Form

    Contact Form

    33
  • Contact Card

    Contact Card

    1.1K
  • Book A Demo 1

    Book A Demo 1

    95
  • Premium Auth

    Premium Auth

    614
  • Onboarding Stepper

    Onboarding Stepper

    13
  • Authentication Card

    Authentication Card

    52