Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

split.js

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

split.js

2kb unopinionated utility for resizeable split views

  • 1.6.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
145K
increased by4.59%
Maintainers
1
Weekly downloads
 
Created

What is split.js?

The split.js npm package is a lightweight library for creating resizable split views or panes in web applications. It allows developers to easily divide a web page into multiple sections that users can resize by dragging the divider between them.

What are split.js's main functionalities?

Creating a simple split view

This feature allows you to create a basic split view with two panes. The code sample demonstrates how to initialize a split view with two elements identified by their IDs. Users can resize the panes by dragging the divider.

Split(['#left-pane', '#right-pane']);

Customizing gutter size and color

This feature allows customization of the gutter (the divider between panes). The code sample shows how to set the gutter size to 10 pixels and change its color to blue, providing a more personalized look and feel.

Split(['#pane1', '#pane2'], { gutterSize: 10, gutterStyle: function(dimension, gutterElement) { gutterElement.style.backgroundColor = 'blue'; } });

Horizontal and vertical splits

This feature supports both horizontal and vertical splits. The code sample demonstrates how to create a vertical split, allowing panes to be resized vertically instead of the default horizontal direction.

Split(['#pane1', '#pane2'], { direction: 'vertical' });

Other packages similar to split.js

Keywords

FAQs

Package last updated on 07 Jan 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc