Atelier UI

搜索组件…

搜索组件…

Textarea Autosize

自适应高度文本域:随输入增高到最大行数后滚动,可显示字数统计。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

TextareaAutosizeProps

同时支持以下类型的全部属性: Omit<React.ComponentProps<"textarea">, "rows">

属性类型默认值说明
minRowsnumber2—
maxRowsnumber8—
showCountbooleanfalseShow a live character counter (needs maxLength)

安装

$ npx shadcn@latest add https://chromotion.dev/r/textarea-autosize.json

同类组件