JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1253
  • Score
    100M100P100Q119818F
  • License UNLICENSE

Resizable behaviour for DOM elements

Package Exports

  • resizable

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (resizable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Resizable

Makes any element resizable. Just as jQuery-UI resizable, but simplier and with no jQuery.

Use

You have to use browserify, component, duo, webmake or any other browser require provider in order to use resizable.

$ npm install resizable

var Resizable = require('resizable');

//make an element draggable
var el = document.querySelector('.my-element');
var resizable = new Resizable(el, {
    //options
    release: true,
    sniper: false,
    axis: 'x'
});

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

Options

Parameter Default Description
within undefined Restrict resizing within the container
handles 'e,w,n,s,nw,ne,sw,se' CSL/Array/Object of handles. Pass specific elements keyed by directions to make them handles.

Events

Name Description
dragstart Drag start
drag Drag iteration
release User released drag
dragend Drag finished, called after release (stopped)