Textarea
The Textarea component is a text field used to get textarea from the user.
Imports
import {
Textarea,
TextareaBase,
TextareaGhost,
TextareaIcon,
TextareaSpinner,
TextareaWrapper,
} from "@adaptui/react-tailwind";
💡
A complex component that supports customization as per the composition guide.
Usage
Textarea Variants
Variants can be set using the variant
prop. The default variant is outline
.
The available variants are: outline
subtle
underline
Textarea sizes
Sizes can be set using the size
prop. The default size is md
. The available
sizes are: sm
md
lg
xl
Textarea autoSize
By setting autoSize
prop the textarea will increase it's size according to the
content.
Textarea Resize
resize
prop contarints the resize direction of the textarea, It can accept 4
values both | vertical | horizontal | none
API Reference
Prop | Type | Default |
---|---|---|
size | union | md |
variant | union | outline |
rowsMin | number | - |
rowsMax | number | - |
autoSize | boolean | false |
disabled | boolean | false |
invalid | boolean | false |
loading | boolean | false |
icon | React.ReactNode | - |
spinner | React.ReactNode | - |
Last updated on July 27, 2022