Inputtextarea add styling and autoResize functionality to standard textarea element.
import { InputTextarea } from 'primereact/inputtextarea';
<script src="https://unpkg.com/primereact/core/core.min.js"></script>
<script src="https://unpkg.com/primereact/inputtextarea/inputtextarea.min.js"></script>
Textarea is used as a controlled input with value and onChange properties.
<InputTextarea rows={5} cols={30} value={value} onChange={(e) => setValue(event.target.value)} />
In auto resize mode, textarea grows instead of displaying a scrollbar.
<InputTextarea rows={5} cols={30} value={value} onChange={(e) => setValue(event.target.value)} autoResize />
InputTextarea passes any attribute to the underlying textarea element, additional attributes are as follows;
Name | Type | Default | Description |
---|---|---|---|
autoResize | boolean | false | When present, height of textarea changes as being typed. |
tooltip | any | null | Content of the tooltip. |
tooltipOptions | object | null | Configuration of the tooltip, refer to the tooltip documentation for more information. |
Following is the list of structural style classes, for theming classes visit theming page.
Name | Element |
---|---|
p-inputtextarea | Textarea element |
This section is under development. After the necessary tests and improvements are made, it will be shared with the users as soon as possible.
None.
Built-in component themes created by the PrimeReact Theme Designer.
Premium themes are only available exclusively for PrimeReact Theme Designer subscribers and therefore not included in PrimeReact core.
Beautifully crafted premium create-react-app application templates by the PrimeTek design team.