Manu Arora

Placeholders And Vanish Input

Text 663

About

Sliding in placeholders and vanish effect of input on submit

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Placeholders And Vanish Input to your project and fits it to your theme.

Code

How Placeholders And Vanish Input is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { PlaceholdersAndVanishInput } from "@/components/ui/placeholders-and-vanish-input";

export function PlaceholdersAndVanishInputDemo() {
  const placeholders = [
    "What's the first rule of Fight Club?",
    "Who is Tyler Durden?",
    "Where is Andrew Laeddis Hiding?",
    "Write a Javascript method to reverse a string",
    "How to assemble your own PC?",
  ];

  const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
    console.log(e.target.value);
  };
  const onSubmit = (e: React.FormEvent<HTMLFormElement>) => {
    e.preventDefault();
    console.log("submitted");
  };
  return (
    <div className="h-[40rem] flex flex-col justify-center  items-center px-4">
      <h2 className="mb-10 sm:mb-20 text-xl text-center sm:text-5xl dark:text-white text-black">
        Ask Aceternity UI Anything
      </h2>
      <PlaceholdersAndVanishInput
        placeholders={placeholders}
        onChange={handleChange}
        onSubmit={onSubmit}
      />
    </div>
  );
}

Dependencies

More by Manu Arora

View all
  • Container Scroll Animation

    Container Scroll Animation

    10.9K
  • Aurora Background

    Aurora Background

    4.7K
  • Glowing Effect

    Glowing Effect

    4.5K
  • Timeline

    Timeline

    4.5K
  • Sparkles

    Sparkles

    4.3K
  • Sidebar

    Sidebar

    3.9K
  • Lamp

    Lamp

    3.9K
  • Bento Grid

    Bento Grid

    2.9K

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    135
  • Astryx Chat Tokenized Text

    Astryx Chat Tokenized Text

    14
  • Scroll Fill Headline

    Scroll Fill Headline

    66
  • Blur Reveal

    Blur Reveal

    398
  • Apple Hello Effect

    Apple Hello Effect

    691
  • Rainbow Text Effect

    Rainbow Text Effect

    61
  • Italic Sweep Scroll Text

    Italic Sweep Scroll Text

    73
  • Shimmering Text

    Shimmering Text

    8