{"library":"scroll-tabs","title":"scroll-tabs","description":"A tiny utility that adds tab scrolling functionality. Version 1.0.1. It provides scroll buttons on either side of a tab container and handles mouse wheel scrolling. It emits a 'scroll' event with the new active node, old active node, and direction. This library exposes ES modules since version 1.0.0 and requires an ES module aware transpiler (Webpack, Rollup, Browserify + babelify) to bundle for the browser. It is lightweight and focuses solely on the scrolling behavior, leaving tab activation to the user.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install scroll-tabs"],"cli":null},"imports":["import scrollTabs from 'scroll-tabs'","import scrollTabs from 'scroll-tabs'","const scroller = scrollTabs(el, options); scroller.on('scroll', handler)"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import scrollTabs from 'scroll-tabs';\n\nconst container = document.querySelector('#my-tabs');\nconst scroller = scrollTabs(container, {\n  selectors: {\n    tabsContainer: '.tabs-container',\n    tab: '.tab',\n    ignore: '.ignore',\n    active: '.active'\n  }\n});\n\nscroller.on('scroll', (newActive, oldActive, direction) => {\n  console.log('Scrolled', direction, 'from', oldActive, 'to', newActive);\n});\n\n// After dynamic tab changes or resize:\nscroller.update();","lang":"javascript","description":"Shows importing scrollTabs, initializing with a container element and selector options, listening to scroll events, and updating after changes.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}