sltowl-merged

Search Input

Forms

About

A controlled search text field with a leading icon, a clear button that appears once there's a value, and an optional typewriter-style cycling placeholder that respects reduced-motion preferences.

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

Code

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

Usage.tsx

import * as React from "react";
import { SearchInput } from "@/components/ui/search-input";

export default function SearchInputDemo() {
  const [query, setQuery] = React.useState("");

  return (
    <div className="w-full max-w-sm">
      <SearchInput
        onValueChange={setQuery}
        placeholder="Search invoices"
        value={query}
      />
    </div>
  );
}

Dependencies

More in Forms

View all
  • Premium Auth

    Premium Auth

    589
  • Contact Card

    Contact Card

    1.1K
  • Login 1

    Login 1

    70
  • Contact Form

    Contact Form

    28
  • Form

    Form

    4
  • HeroUI Field Error

    HeroUI Field Error

    13
  • Form

    Form

    6
  • Book A Demo 4

    Book A Demo 4

    69