Textarea

Stable

Multi-line text input with character counting and auto-resize.

Import

import { Textarea } from '@brutal-ui/react';

Basic Usage

Characters: 0

const [value, setValue] = useState('');

<Textarea
  value={value}
  onChange={(e) => setValue(e.target.value)}
  placeholder='Write something brutal here...'
  rows={5}
/>

With Label

<Textarea
  label='Description'
  placeholder='Enter a detailed description...'
  rows={4}
/>

With Error

Comment must be at least 10 characters

<Textarea
  label='Comment'
  placeholder='Add your comment...'
  error='Comment must be at least 10 characters'
  rows={3}
/>

Disabled State

Props

PropTypeDefaultDescription
labelstring-Label text
placeholderstring-Placeholder text
rowsnumber3Number of visible rows
errorstring-Error message
disabledbooleanfalseDisable textarea