Skip to main content

TextField

TextField allows a user to enter a plain text value with a keyboard.

On this page
Props
<TextField>
  <Label>Email</Label>
  <Input />
</TextField>

Installation

npx shadcn@latest add @dotui/text-field

Usage

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.

mirrored text: Hello world!

API Reference

A text field allows a user to enter a plain text value with a keyboard.

PropType
string
ReactNode | function
union
union
boolean
boolean
string
union
string
string
function

Last updated on 6/16/2026