0.0.5 • Published 3 years ago
@aknakos/sveltekit-resizable-div v0.0.5
Simple resizable div for svelte
Simple implementation of a resizable div for svelte. Only supports NE resizing for now. I made this to easily reuse the logic, but feel free to copy the code in the .svelte file to customize however you want and/or if you don't want to install a dependency only for this.
Usage:
<script>
import ResizableDiv from '@aknakos/sveltekit-resizable-div';
function click(){};//called when resize is clicked
function release(){};//called when resize is released
function move(){};//called when size changes during resizing
</script>
<h1>Welcome to SvelteKit</h1>
<ResizableDiv on:click={click} on:release={release} on:move={move}>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
</ResizableDiv>