@svelte-put/resize
v4.0.0
Published
Svelte action wrapper for ResizeObserver
Downloads
737
Maintainers
Readme
@svelte-put/resize
Svelte action use:resize
wrapper for ResizeObserver.
svelte-put
This package is part of the @svelte-put family. For contributing guideline and more, refer to its readme.
Usage & Documentation
See the dedicated documentation page here.
Quick Start
<script lang="ts">
import { resize } from '@svelte-put/resize';
import type { ResizeDetail } from '@svelte-put/resize';
function onResized(e: CustomEvent<ResizeDetail>) {
console.log(e.detail);
}
</script>
<div use:resize on:resized="{onResized}" />