Skip to content

Textarea

A native textarea element.

Installation

pnpm dlx shadcn@latest add @frontal-labs/textarea

Usage

import { Textarea } from "@/components/ui/textarea";
<Textarea />

Field Integration

Base UI does not provide a Textarea primitive, so this component renders a plain native <textarea>. It sits inside Field like any other control.

<Field>
  <FieldLabel>Bio</FieldLabel>
  <Textarea placeholder="Tell us about yourself…" />
  <FieldDescription>Write a short bio.</FieldDescription>
  <FieldError>This field is required.</FieldError>
</Field>

API Reference

Textarea

Styled native textarea element. All standard textarea attributes are supported and forwarded to the underlying element. Height grows with the content via field-sizing-content, from a min-h-16 floor.

In light mode the field carries a bg-muted fill on top of its border, so an empty textarea stays visible against a white surface instead of relying on the border alone. Disabled textareas switch to bg-input/50.

Examples

Disabled

With Label

Form Integration