/Resizable

Simple and clean pure ES6 JS library without dependencies to make columns of an HTML table resizable (with optional save and restore)

Primary LanguageJavaScriptMozilla Public License 2.0MPL-2.0

Resizable

Download the entire project and run example-1 and example-2.

screen shot 2018-11-01 at 8 24 35 am

Usage:

Basic call

new Resizable(document.getElementById('my-table'));

Advanced call

[...document.querySelectorAll('table')].map(table => new Resizable(table, {
  'persist': true, // to save and restore,
  'width': 8, // width of the draggable
  'offset': 3, // offset for placing the draggable
  'min': 50, // minimum block size
  'background-color': 'rgba(0, 0, 0, 0.3)'
}));

Pull requests are always welcome!