Text area
Accepts multiple lines of text.
text-area-basic-demo.tsx
Installation
The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.
npm
yarn
pnpm
bun
Composition
TextAreaOwns the value and validation state.
TextAreaLabelTextAreaInputTextAreaDescriptionTextAreaError
Description
Tell us what to change. We read every message.
text-area-description-demo.tsx
Disabled
text-area-disabled-demo.tsx
Read only
text-area-read-only-demo.tsx
Invalid
Enter at least 10 characters.
text-area-invalid-demo.tsx
Sizes
Size changes the padding, radius, and text, not the height.
text-area-sizes-demo.tsx
API reference
vip/ui adds or changes the props below. For all other props, see React Aria TextField (opens in a new tab).
- size: "xs" | "sm" | "md" | "lg" | "xl" = "lg"
- Sets the padding, radius, and text size. The height does not change.
- label: string
- Label above the field in the default layout.
- description: string
- Help text below the field in the default layout.
- placeholder: string
- Input placeholder in the default layout.
- rows: number = 4
- Number of visible text lines.