On this page
Props
<TextField>
<Label>Email</Label>
<Input />
</TextField>Installation
npm
pnpm
yarn
bun
npx shadcn@latest add @dotui/text-fieldUsage
Use a TextField to allow users to input custom text entries with a keyboard.
import { TextField } from '@/components/ui/text-field'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/field'<TextField>
<Label>Email</Label>
<Input placeholder="hello@example.com" />
</TextField>Examples
Enter your email.
Enter a valid email address.
https://
@example.com
mirrored text: Hello world!
API Reference
A text field allows a user to enter a plain text value with a keyboard.
| Prop | Type | Default | |
|---|---|---|---|
string | — | ||
ReactNode | function | — | ||
union | — | ||
union | — | ||
boolean | — | ||
boolean | — | ||
string | — | ||
union | 'text' | ||
string | — | ||
string | — | ||
function | — | ||
Last updated on 6/16/2026