Skip to content

acrool/acrool-react-auto-height-textarea

Repository files navigation

Acrool React Auto Height Textarea

Acrool React Auto Height Textarea Logo

Auto-height Textarea element.

NPM npm npm

npm downloads npm

Features

  • Auto-height Textarea element.

Install

yarn add @acrool/react-auto-height-textarea

Usage

add in your index.tsx

import "@acrool/react-auto-height-textarea/dist/index.css";

add in your App.tsx

import AutoHeightTextarea from '@acrool/react-auto-height-textarea';

const Example = () => {
    const [value, setValue] = useState('');
    
    return <Comment
        value={value}
        onChange={e => setValue(e.target.value)}
        placeholder="Type your message"
        rows={1}
    />;
}

License

MIT © Acrool & Imagine