About
A single-line text input with a built-in label, description and error message wired for screen readers, plus an optional leading icon and a clear button.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Text Field to your project and fits it to your theme.
Code
How Text Field is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { TextField } from "@/components/ui/text-field";
export default function TextFieldSearchBoxDemo() {
return (
<div className="w-full max-w-sm mx-auto p-6 bg-background text-foreground">
<TextField
label="Search places"
hideLabel
type="search"
placeholder="Tapas, wine, a street…"
defaultValue="tapas"
onClear={() => {}}
/>
</div>
);
}





