Textarea
Multiline text input. Free, MIT · Forms and input › Text
Multi-line field. With maxLength a character counter is shown. className and style go to the field wrapper, other props to the native <textarea>.
Installation
npx valyro-cli@latest add textarea
npx shadcn@latest add https://valyro.xyz/r/textarea.json
npm install valyro-ui
import 'valyro-ui/styles.css';
import { Textarea } from 'valyro-ui';
Props
| Prop | Type | Default | |
|---|---|---|---|
invalid | boolean | false | Error border and aria-invalid on the textarea (an explicit aria-invalid wins). |
size | 'sm' | 'md' | 'lg' | 'md' | Text size and padding, like TextInput's sm / md / lg. |
autoResize | boolean | false | Grow with the content between minRows and maxRows. |
minRows | number | 3 | Visible rows when empty (also the initial height without autoResize). Default 3. |
maxRows | number | Height limit for autoResize; the textarea scrolls beyond it. | |
locale | string | Locale for the character counter numbers (default: the ThemeProvider's, then the browser's). |
Related components
- Text Input — Text fields
- Search Input — Search field
- Mentions Input — Text with @mentions and #tags, async suggestions
- Tags Input — Tag entry
- Select — Pick one option from a list
- Multi Select — Pick several options
- Combobox — Searchable select
- Listbox — Option list on the page: one or several, Shift ranges
- Chip Group — Chip group with icons: one or several options
- Checkbox Tree — Checkbox tree: cascading, indeterminate state, keyboard
- Checkbox — Checkboxes
- Checkbox Group — Checkboxes under one label, hint, error and requirement
Previous: Text Input · Next: Search Input · All Forms and input