About
A floating-label text input with filled and outlined variants, leading/trailing icon slots, and supporting/error text, following Google's Material 3 design spec.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Material Text Field to your project and fits it to your theme.
Code
How Material 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";
import { useState } from "react";
export default function FilledTextFieldDemo() {
const [name, setName] = useState("");
return (
<div className="flex min-h-screen w-full items-center justify-center bg-[#fef7ff] p-8">
<TextField
label="Full name"
variant="filled"
value={name}
onChange={(event) => setName(event.currentTarget.value)}
/>
</div>
);
}











