Hook
useAutosizeTextarea
Grows a textarea to fit its content up to a maximum height, then scrolls.
Install
npx shadcn@latest add https://ui.inflection.network/r/use-autosize-textarea.jsonUsage
Returns
| Name | Type | Description |
|---|---|---|
| value* | string | The current text, measured on every change. |
| maxHeight | number | Pixels, after which it scrolls instead of growing.Default: 160 |
* required