A textarea with optional auto-grow and the same states as TextInput.
DefaultAuto-growInvalid
<Textarea bind:value autoGrow placeholder="Add context…" />Installation
pnpm add @chanrg/4uiImport the stylesheet once, at the root of your app:
import '@chanrg/4ui/styles.css';Usage
import { Textarea } from '@chanrg/4ui';<Textarea bind:value autoGrow placeholder="Add context…" />API reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string ($bindable) | '' | Content. |
rows | number | 3 | Initial rows. |
autoGrow | boolean | false | Grow with content instead of scrolling. |
CSS variables
| Variable | Description |
|---|---|
--4ui-surface | Primary component surface. |
--4ui-text | Primary foreground color. |
--4ui-border | Default control and panel border. |
Accessibility
- Composes with Field; keeps native resize unless autoGrow.