Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Svelte action to automatically adjust textarea height.

License

NotificationsYou must be signed in to change notification settings

jesseskinner/svelte-autosize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Svelte action to automatically adjust textarea height to match its contents.

Simply wrapsautosize by Jack Moore in a Svelte action.

Seethe autosize website for additional documentation.

Install via NPM

npm install svelte-autosize

Usage

<script>importautosizefrom'svelte-autosize';</script><textareause:autosize></textarea>

If you need to reset the textarea height, you can useautosize.update(textarea). For example:

<script>import{tick}from'svelte';importautosizefrom'svelte-autosize';lettextarea;letvalue='';asyncfunctionreset(){value='';awaittick();autosize.update(textarea);}</script><textareause:autosizebind:this={textarea}bind:value></textarea><buttonon:click={reset}>Reset</button>

License

MIT

About

Svelte action to automatically adjust textarea height.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp