About
A styled text input field with size, validation-state variants, and optional start/end icon adornments for building forms.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Input to your project and fits it to your theme.
Code
How Input is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import * as React from "react";
import Input from "@/components/ui/input";
import { MdLock, MdVisibility, MdVisibilityOff } from "react-icons/md";
export default function PasswordInputDemo() {
const [showPassword, setShowPassword] = React.useState(false);
return (
<Input
type={showPassword ? "text" : "password"}
startAdornment={<MdLock size={18} />}
endAdornment={
<button
type="button"
onClick={() => setShowPassword(!showPassword)}
className="hover:text-ink transition-colors"
>
{showPassword ? (
<MdVisibilityOff size={18} />
) : (
<MdVisibility size={18} />
)}
</button>
}
placeholder="Enter password"
className="w-64"
/>
);
}
















![Form [react-aria-components]](https://cdn.21st.dev/cdn-cgi/image/fit=scale-down,width=640,quality=75,format=webp/https://cdn.21st.dev/user_jolbol1/field/814/preview.png)