ValyroUI Русская версия

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

PropTypeDefault
invalidbooleanfalseError 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.
autoResizebooleanfalseGrow with the content between minRows and maxRows.
minRowsnumber3Visible rows when empty (also the initial height without autoResize). Default 3.
maxRowsnumberHeight limit for autoResize; the textarea scrolls beyond it.
localestringLocale for the character counter numbers (default: the ThemeProvider's, then the browser's).

Related components

Previous: Text Input · Next: Search Input · All Forms and input