--- title: Textarea description: Textareas capture multi-line text (descriptions, comments, and messages) with configurable row height. category: Forms --- import { meta as TextareaMeta, Default } from '@/content/stories/textarea'; import Canvas from '@/components/component-docs/canvas'; import Demo from '@/components/component-docs/demo'; export const config = { dependencies: { components: [Canvas, Demo], scripts: [ '../../components/component-docs/demo.script.tsx', '../../components/component-docs/canvas.script.tsx', '../../components/component-docs/controls.script.tsx', ], }, }; # Textarea
Textareas capture multi-line text (descriptions, comments, and messages) with configurable row height.
## Try itMatch `rows` to the expected content length. Short notes need fewer rows than essay-length fields.
## Theming Textarea surfaces map to **semantic surface roles**, never Tailwind palette steps: | Part | CSS roles | | --- | --- | | Surface (`.rui-textarea`) | `border`, `background`, `rounded-control`, `text-control` | | Focus / invalid | `focus-ring` / `error` | | Disabled | `opacity-disabled` | Geometry shares control tokens (`--space-control-x`, `--space-control-y`, `--radius-control`, `--text-control`) with `RuiInput` and `RuiButton` so form rows align. Override at the theme layer, not in component CSS. ## API `RuiTextarea` is a **presentational view**, no custom element. It renders a native `