Pankaj Patel
Pankaj Patel

Pankaj Patel

Today's npm package: split.js

Today's npm package: split.js

Pankaj Patel's photo
Pankaj Patel
·Jun 22, 2021·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

Today's npm package is split.js

Layout's with adjustable width/height can be tricky to handle and may take a lot of time to get it right.

split.js is aims to solve this with very minimal JS.

Here's how to use it for the following HTML

  <main>Content area</main>

Following would make the vertical resizable split:

const Split = require('split.js');

Split(['aside', 'main'], {
    minSize: [100, 300],
    minSize: [300, Infinity],
    direction: 'vertical'

Stay tuned for tomorrow's package of the Day.

Share this