https://github.com/d0x2f/svelte-textarea-autoresize
An autoresizing textarea for Svelte.
https://github.com/d0x2f/svelte-textarea-autoresize
Last synced: over 1 year ago
JSON representation
An autoresizing textarea for Svelte.
- Host: GitHub
- URL: https://github.com/d0x2f/svelte-textarea-autoresize
- Owner: d0x2f
- License: mit
- Created: 2020-06-27T04:01:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-24T16:04:26.000Z (over 5 years ago)
- Last Synced: 2025-02-28T18:59:40.797Z (over 1 year ago)
- Language: JavaScript
- Size: 625 KB
- Stars: 8
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Svelte Textarea Autoresize
An autoresizing textarea component that adjusts it's height based on it's content.
Based on the wonderful [andarist/react-textarea-autosize](https://github.com/Andarist/react-textarea-autosize).
## Install
```sh
$ npm install svelte-textarea-autoresize
```
## Demo
https://dyl.dog/svelte-textarea-autoresize/
## Use
You can either use the component as is:
```html
import AutoresizingTextArea from 'svelte-textarea-autoresize'
```
or by using the exported `autoresize` function on your existing component like so:
```html
import { autoresize } from 'svelte-textarea-autoresize'
```