Xzero UI
Pro library

Textarea

A multiline field for notes, descriptions, and longer text.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui/textarea
Live · keyboard ready

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui/textarea

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { Textarea } from "@/components/xzero/textarea/textarea";

export function BioField() {
  const [bio, setBio] = useState("");
  return (
    <Textarea
      label="Bio"
      rows={4}
      value={bio}
      onChange={(event) => setBio(event.target.value)}
      description={`${280 - bio.length} characters left`}
    />
  );
}

API reference

Textarea

A labelled multi-line field with the same animated helper and error rows as Input.

PropTypeDefaultDescription
label (required)string–Visible label, tied to the textarea with htmlFor.
descriptionstring–Helper copy under the field, linked through aria-describedby. Counts such as "120 characters" roll their digits.
errorstring–Error copy. Sets aria-invalid and renders in a role="alert" row.
...propsTextareaHTMLAttributes<HTMLTextAreaElement>–Forwarded to the native textarea, including ref, rows, value, onChange, and maxLength.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Also in text fields

Guidance for AI tools

Textarea: A multiline field for notes, descriptions, and longer text. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components