All Projects → annexare → scrolly.js

annexare / scrolly.js

Licence: MIT license
Scrolly: fast vanilla JS scrollbar plugin with React.js Component & jQuery/Zepto/jBone plugin.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to scrolly.js

react-is-scrolling
Simply detect if users are scrolling in your components in a declarative API
Stars: ✭ 17 (-5.56%)
Mutual labels:  scrollbar
qis
Dynamic image server for web and print
Stars: ✭ 85 (+372.22%)
Mutual labels:  vanilla-js
svg-pan-zoom-container
A vanilla-js module for adding zoom-on-wheel and pan-on-drag behavior to inline SVG elements.
Stars: ✭ 31 (+72.22%)
Mutual labels:  vanilla-js
js-study-lv1
단국대학교 자바스크립트 스터디 레벨 1 과정을 위한 저장소
Stars: ✭ 18 (+0%)
Mutual labels:  vanilla-js
react-scroll-locky
📜🔒 – React full-cream "anti-scroll" library, you were looking for
Stars: ✭ 55 (+205.56%)
Mutual labels:  scrollbar
GithubSquare
Explore the most starred projects , trending developers , popular repositories of any date and face off Github Profiles of your choice.
Stars: ✭ 37 (+105.56%)
Mutual labels:  vanilla-js
Swiped Events
Adds `swiped` events to the DOM in 0.7k of pure JavaScript
Stars: ✭ 249 (+1283.33%)
Mutual labels:  vanilla-js
eslint-config-yara
Yara Digital Labs JavaScript Style Guide
Stars: ✭ 12 (-33.33%)
Mutual labels:  vanilla-js
react-custom-scroller
Super simple React component for creating a custom scrollbar cross-browser and cross-devices.
Stars: ✭ 30 (+66.67%)
Mutual labels:  scrollbar
tensorflowjs-remove-background
Remove Background from the picture using WebAssembly & TensorFlow.js
Stars: ✭ 79 (+338.89%)
Mutual labels:  vanilla-js
zepto.clearinput
zepto clear input
Stars: ✭ 15 (-16.67%)
Mutual labels:  zepto
zepto-refresh
实现下拉到底部和上拉到顶部再拉就出现刷新效果
Stars: ✭ 20 (+11.11%)
Mutual labels:  zepto
esl
Lightweight and flexible UI component library based on web components technology for creating basic UX modules
Stars: ✭ 53 (+194.44%)
Mutual labels:  scrollbar
curved-menu
VanillaJS fully configurable curved menu (circular navigation)
Stars: ✭ 30 (+66.67%)
Mutual labels:  vanilla-js
ngx-malihu-scrollbar
Angular 2+ scrollbar customization using Malihu jQuery Custom Scrollbar plugin
Stars: ✭ 59 (+227.78%)
Mutual labels:  scrollbar
js-plugin-starter-kit
VanillaJS (pure JavaScript) plugin starter with Webpack 4 and Babel 7.
Stars: ✭ 100 (+455.56%)
Mutual labels:  vanilla-js
form-saver
A simple script that lets users save and reuse form data.
Stars: ✭ 67 (+272.22%)
Mutual labels:  vanilla-js
event-driven-web-components-realworld-example-app
Exemplary real world application built with Vanilla JS Web Components in an Event Driven Architecture
Stars: ✭ 55 (+205.56%)
Mutual labels:  vanilla-js
eins-modal
Simple to use modal / alert / dialog / popup. Created with pure JS. No javascript knowledge required! Works on every browser and device! IE9
Stars: ✭ 30 (+66.67%)
Mutual labels:  vanilla-js
clocklet
An opinionated clock-style vanilla-js timepicker.
Stars: ✭ 31 (+72.22%)
Mutual labels:  vanilla-js

Scrolly: fast vanilla JS scrollbar plugin

Monthly Downloads NPM Twitter

Aim is a fast + good looking scrollbar with zero dependencies, small size & major browsers support. So, the Browser Support is same as for MutationObserver, works in all modern browsers for Desktop and Mobile.

Install, via Bower or NPM

  • bower install scrolly
  • npm install scrolly

Features & Usage

  • Small (~6KB minified), fast, vanilla JS (zero dependencies)
  • Nested scrollbars
  • Touch support
  • jQuery/Zepto/jBone plugin
  • React.js Component
  • Infinite scroll (top/bottom edge reach) callbacks
// Initialize
var ids = scrolly.bar(query|node|string, params);
// or
var id = scrolly.barNode(node, params);
// Body element is also supported
var id = scrolly.barNode(document.body, params);

// Update
scrolly.update(id);
// or update everything
scrolly.updateAll();

// Dispose
scrolly.dispose(id);
// or cleanup everything
scrolly.disposeAll();

React Component

See example usage: gulp watch and open /react. Or just look at public/react/index.html in this repo.

<Scrolly params={ params }>
    <h1>Some test contents here</h1>
    <p>Contents to be scrolled...</p>
</Scrolly>

jQuery/Zepto/jBone Plugin flavour

// jQuery Plugin
$('.selector').scrolly();
// ...and it's chained as well

// Update
$('.selector').scrolly('update');

// Dispose
$('.selector').scrolly('dispose');

Demo

Just open public/index.html, or check the Live demo. For React Component demo check public/react/index.html or scrolly/react.

Details

Data: DOM elements

data        LESS:
{
  wrap      .scrolly
  area        .area
  bar       .scrolly + .bar
  thumb       .thumb
}

Data: numbers

  • data.wrapRatio: float 0..1. Calculated as wrapSize / areaSize. When === 1 no scrollbar is shown.

Setup

  1. Clone this repo.
  2. Install Node.js. Then Gulp: npm install -g gulp.
  3. Terminal, from project directory:
    • Dev dependencies: npm install.
    • gulp -T to see all available stuff.
    • gulp watch to run a local dev server, open in on localhost:3001.
    • gulp build-all to clean & build everything.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].