Socket
Socket
Sign inDemoInstall

flex-splitter-directive

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    flex-splitter-directive

Dead simple pane-splitter control based on flexbox.


Version published
Weekly downloads
118
decreased by-31.4%
Maintainers
1
Install size
15.1 kB
Created
Weekly downloads
 

Readme

Source

flex-splitter-directive

Dead simple panes splitter control based on flexbox.

Demo

  • Declarative.
    Just add an attribute to the DOM element. Don't need to write any JavaScript.
  • Lightweight.
    JS + CSS ~ 1.2kB (gzipped) with no dependencies.

Installation

npm (with a module bundler)

$ npm i flex-splitter-directive
import "flex-splitter-directive"
import "flex-splitter-directive/styles.min.css"

CDN (jsDelivr)

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flex-splitter-directive@0.5.0/styles.min.css">
<script src="https://cdn.jsdelivr.net/npm/flex-splitter-directive@0.5.0"></script>

Download Directly

Usage

  1. Load CSS and JS.
  2. Set data-flex-splitter-horizontal (or data-flex-splitter-vertical for vertical) attribute to the parent element of the panes.
    • Optionally, specify the keyboard-movement option, as in data-flex-splitter-horizontal="keyboard-movement:10".
  3. Insert <div role="separator" tabindex="1"></div> between each pane.
  4. Set the following styles for each pane as required:
    • width / height for the initial size.
    • min-width / min-height for the minimum size.
    • max-width / max-height for the maximum size.
    • flex: auto for filling space.

License

WTFPL

Other vanilla-js panes splitters

Keywords

FAQs

Last updated on 18 Sep 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc