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 { Badge, Reshaped, View } from "reshaped/bundle";
import TextField from "@/components/ui/reshaped-text-field";
export default function Demo() {
return (
<Reshaped theme="slate">
<div style={{ margin: "0 auto", padding: 24, display: "flex", justifyContent: "center" }}>
<View width="280px">
<TextField
name="food"
placeholder="Pick your favorite food"
startSlot={[
<Badge key="1" size="small">
Cinnamon bun
</Badge>,
<Badge key="2" size="small">
Pasta
</Badge>,
<Badge key="3" size="small">
Ice-cream
</Badge>,
<Badge key="4" size="small">
Pizza
</Badge>,
]}
defaultValue="Pineapple"
multiline
/>
</View>
</div>
</Reshaped>
);
}
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...