Textarea
A multi-line text input.
Pass a string as value; onChange returns the next value and the event.
Live example
Example controls
Usage
'use client';
import { Textarea } from '@prosazhin/pbcomponents';
import { useState } from 'react';
function Example() {
const [value, setValue] = useState('');
return (
<Textarea
value={value}
onChange={setValue}
placeholder='Placeholder'
/>
);
}Component API
| Prop | Type / variants | Purpose | Default |
|---|---|---|---|
size | 's' | 'm's · m | Component size. | m |
disabled | boolean | Disables interaction. | false |
error | boolean | Shows the error state. | false |
placeholder | string | Hint in an empty field. | — |
value | string | Current value of a controlled component. | — |
onChange | (value: string, event: InputEvent) => void | Reports the new text and input event. | — |
className | string | Class of the root element. | — |
wrapperClassName | string | Class of the outer wrapper. | — |
rows | number | Number of visible rows. | — |
Native HTML attributes are accepted where the component renders the corresponding element. className props only affect styling.