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 TextFieldSizesDemo() {
return (
<div className="w-full max-w-sm mx-auto p-6 bg-background text-foreground flex flex-col gap-4">
<TextField size="sm" label="Small" placeholder="Placeholder" />
<TextField size="md" label="Medium" placeholder="Placeholder" />
<TextField size="lg" label="Large" placeholder="Placeholder" />
</div>
);
}













