Resize Svelte

npm license npm bundle size svelte


Description

svelte-resize is vanilla without any 3rd party dependencies library made for svelte written in typescript. Super simple API thats easy to integrate.

Demo

Installation

With pnpm:

pnpm install svelte-resize

With Yarn:

yarn add svelte-resize

With NPM:

npm install svelte-resize

Usage


<script>
  import { resize } from 'svelte-resize'
</script>


<div use:resize />

Props

Main props

prop Description type default required
disabled Disables resize boolean false false
minimumSize Sets the minimum size in px the node is allowed to resize number 20 px false
maximumSize Sets the maxiumum size in px the node is allowed to resize number null false
handlerSize Size of the resize handler number 10 px false
handlers Specifies the corner that is able to resize { leftTop, leftBottom, rightTop, rightBottom } { leftTop: true, leftBottom: true, rightTop: true, rightBottom: true } false
borderStyle Style applied to handler string ""2px solid rgba(0, 0, 0, 0.4)" false

Top categories

Loading Svelte Themes