bx

Textarea

Displays a form textarea or a component that looks like a textarea.

tsx
<Label htmlFor="msg">Message</Label>
<Textarea id="msg" placeholder="…" rows={4} />

Textarea<textarea> HTML natif stylé shadcn. Pour du texte multiline (message, description, notes). Auto-resize non inclus — utiliser rows ou du CSS.

Installation

Terminal
$ bext ui add textarea

Usage

tsx
import { Textarea, Label } from "@bext-stack/ui/primitives"

<div className="grid gap-2">
  <Label htmlFor="msg">Message</Label>
  <Textarea id="msg" placeholder="Type your message here..." rows={4} />
</div>

Anatomy

<Textarea name value placeholder rows disabled required />

API Reference

Textarea

Prop Type Default Description
name string Nom pour form.
value / defaultValue string Contrôlé ou non.
placeholder string undefined
rows number 3 Nombre de lignes visibles.
disabled boolean undefined
required boolean undefined

Keyboard

Key Action
Enter Newline (contrairement à Input qui submit).
Ctrl+Enter Convention : envoyer / submit — à câbler côté form si voulu.

Accessibility

Toujours accompagner d'un <Label htmlFor="id">. Placeholder n'est pas un label.

Try it live Open in play

Edit this example live in the bext playground — it compiles and runs entirely in your browser.

src/app/page.tsx 1 file · react · runs in your browser
The React idiom — same UI, for comparison.