1.3.3 ā€¢ Published 8 months ago

@marcreichel/alpine-autosize v1.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

šŸš€ Installation

CDN

Include the following <script> tag in the <head> of your document, just before Alpine.

<script src="https://cdn.jsdelivr.net/npm/@marcreichel/alpine-autosize@latest/dist/alpine-autosize.min.js" defer></script>

NPM

npm install @marcreichel/alpine-autosize

Add the x-autosize directive to your project by importing the package before starting Alpine.

import Alpine from 'alpinejs';
import Autosize from '@marcreichel/alpine-autosize';

Alpine.plugin(Autosize);

Alpine.start();

šŸŖ„ Usage

To let the textarea automatically resize, add the x-data and x-autosize directives to the <textarea>.

<textarea x-data x-autosize></textarea>

ā¬ Additional height

To add additional height to the textarea - which might be necessary in some occasions - you can do so using the "padding" modifier like so (only px values are supported):

<textarea x-data x-autosize.10px></textarea>

This adds additional 10px to the textarea height. You can provide any integer which best suits your needs.

šŸ“„ License

Copyright (c) 2022 Marc Reichel and contributors.

Licensed under the MIT license, see LICENSE for details.

1.3.3

8 months ago

1.3.2

11 months ago

1.3.1

11 months ago

1.3.0

11 months ago

1.2.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago