Components
Single-line text input taking a name and optional onChange, in controlled or uncontrolled mode. Supports prefix/suffix affixes, start/end slots for badges and inline actions, multiline selected values, start/end icons, four sizes, a rounded shape, faded and headless variants, error and disabled states, and FormControl integration.
npx @21st-dev/cli add reshaped/reshaped-text-fieldLoading preview...
import { Reshaped, View } from "reshaped/bundle";
import TextField from "@/components/ui/reshaped-text-field";
const MailIcon = () => (
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<rect x="2" y="4" width="20" height="16" rx="2" />
<path d="m22 7-10 5L2 7" />
</svg>
);
export default function Demo() {
return (
<Reshaped theme="slate">
<div style={{ maxWidth: 360, width: "100%", margin: "0 auto", padding: 24 }}>
<View gap={3}>
<TextField icon={<MailIcon />} name="email" size="small" placeholder="Enter your email" />
<TextField icon={<MailIcon />} name="email" size="medium" placeholder="Enter your email" />
<TextField icon={<MailIcon />} name="email" size="large" placeholder="Enter your email" />
<TextField icon={<MailIcon />} name="email" size="xlarge" placeholder="Enter your email" />
</View>
</div>
</Reshaped>
);
}
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...