Textarea
Multi-line text input with an optional character counter.
Optional.0/300
Usage
import { Textarea } from '@smartui/react';
import '@smartui/react/styles.css';When to use
- Free text longer than one line: notes, reasons.
When not to use
- Short single-line input. Use Field.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Always visible above the control. |
helperText | string | - | Help text below the control. |
errorMessage | string | - | Shown when isInvalid; replaces the helper text. |
variant | 'raised' | 'flat' | 'raised' | Raised on the canvas, flat inside a white card. |
isInvalid, isDisabled, isRequired | boolean | false | |
maxLength | number | - | Shows the counter. |
rows | number | 3 |
Accessibility
- State the limit up front; do not reveal it only after it is exceeded.