Skip to main content

Today's npm package: split.js

Updated 1 min readMarkdown
Part of seriesPackage of the Day
Today's npm package: split.js

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

<div>
  <aside>Menu</aside>
  <main>Content area</main>
</div>

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.

About the author

  • I am developer from India currently based in Berlin, Germany.

    I am very interested in Design, though I don't design 😉 I take care of it while making my apps.

    Photography, videography and having random conversation over beer are my activities of spare time. Timelapses and hyperlapses make me wonder all the time 😊

No comments yet. Be the first to comment.

More from this blog