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

sbweb-dragband

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sbweb-dragband

UI library to create a draggable list bar. Reponsive, scrollable, swipeable

  • 0.2.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

DragBand

UI library to create a draggable list bar

  • Native javascript
  • Responsive
  • Supports swiping

Usage

// create a dragBar with itemindex 11 selected by default
var myDragBand = dragBand.init(
    document.querySelector('#myul'), 11, {
        leftScroller : document.getElementById('left-scroll-button'),
        rightscroller : document.getElementById('right-scroll-button'),
        scrollstep : 50,
        elasticWidth : 100,
        hideScrollerMargin : 20
    });

// select no item
myDragBand.selectItem(null);

// select item with index 2
myDragBand.selectItem(2);


// create object with default options and no scrollbuttons
var simpleDragBand = dragBand.init(document.querySelector('#simple'));

Options

Configure the third parameter of init method as an object with the following properties:

PropertyTypeDescriptiondefault
leftScrollerObjectelement representing left scrollbuttonnull
rightscrollerObjectelement representing right scrollbuttonnull
scrollstepnumberpx to scroll when using wheel/scrollbutton50
elasticWidthnumberelasticity beyond left/right edges in px100
hideScrollerMarginnumberhidden buttons when with margin from edge20

Example

Check https://codepen.io/anon/pen/vzaaoL for an example.

Keywords

FAQs

Package last updated on 24 Nov 2018

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