0.0.6 • Published 1 year ago

svelte-autoresize-textarea v0.0.6

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Auto-resize Textarea for Svelte

An in-built auto-resize functionality for a textarea element using the scroll height of a singleton proxy textarea element attached to the document body. This is the 100% accurate implementation and does not break irrespective of the borders, padding, or amount of text.

Install

npm install svelte-autoresize-textarea

Usage

<script>
import { AutoResizeTextarea } from "svelte-autoresize-textarea";
</script>

<template>
  <AutoResizeTextarea
    :maxRows="10"
    :minRows="4"
  />
</template>

Props

proptypedescription
maxRowsnumberMaximum number of rows up to which the textarea can grow
minRowsnumberMinimum number of rows to show for textarea

Apart from these, the component accepts all props that are accepted by <textarea/>.

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago