Skip to content
Logic2BUI

Search docs

Search components and documentation

New
Menu

Textarea

Displays a form textarea that auto-sizes to its content.

Installation

npx logic2b@next add textarea

Usage

import { Textarea } from "@/components/ui/textarea"

<Textarea placeholder="Type your message here." />

Usage notes

Textarea renders a native <textarea> and forwards every prop it accepts. It auto-sizes to its content (field-sizing-content) and styles aria-invalid for validation states.

Examples

With label

Your message will be copied to the support team.

Disabled

With a button

Live playground

Edit the component props and inspect the exact JSX before copying it. The preview loads only when this section enters the viewport.

Generated JSX
<Textarea
  placeholder="Write a message…"
  rows={4}
  aria-label="Message"
 />

API reference

Generated from the public TypeScript exports in src/ui/textarea.tsx.

View JSON

Textarea

Component
Props: React.ComponentProps<"textarea">

Accessibility contract

Machine-readable behavior and consumer responsibilities for textarea.

View JSON
Support
Native semantics
Pattern
textbox
HTMLTextAreaElement

Built-in semantics

  • Forwards native multiline textbox semantics and aria-invalid state.

Consumer responsibilities

  • Associate a visible label and expose validation messages with aria-describedby.