Textarea
Displays a form textarea or a component that looks like a textarea.
Textarea — <textarea> HTML natif stylé shadcn. Pour du texte multiline (message, description, notes). Auto-resize non inclus — utiliser rows ou du CSS.
Installation
$ bext ui add textarea
Copy and paste the following into src/components/ui/textarea.tsx.
Usage
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.
Edit this example live in the bext playground — it compiles and runs entirely in your browser.
The React idiom — same UI, for comparison.
On This Page