New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

resizable

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resizable

Resizable behaviour for elements

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
1K
-23.72%
Maintainers
1
Weekly downloads
 
Created
Source

Resizable

Resizable behaviour for elements. Demo.

npm install resizable

import Resizable from 'resizable';

var resizable = new Resizable(document.querySelector('.my-element'), {
	within: 'parent',
	handles: 's, se, e',
	threshold: 10,
	draggable: false
});

resizable.on('resize', function(){
	//...
});

Options

ParameterDefaultDescription
handles*List of handles to support. Valid handles: s, se, e, ne, n, nw, w, sw. May be specified as an object, array, or comma-separated string.
resizeundefinedResize event handler.
threshold10A movement threshold required to start resize - whether array, number or function.
withindocumentRestrict movement within the container. Pass 'parent' to take parent node.
draggablefalseMake element draggable as well. Set an object to pass options to draggable.
css3trueUse translate3d for defining position.

* Default handles are dependent on the styling of the given element. Inline elements will default to s, se, e, while elements that can support full resize will default to all handles being enabled.

Events

NameDescription
resizestartElement resize started.
resizeElement resized.
resizeendElement resize ended.

License

MIT

🕉

Keywords

resizable

FAQs

Package last updated on 18 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts