All Projects β†’ yowainwright β†’ mousecase

yowainwright / mousecase

Licence: MIT license
A JavaScript utility enabling horizontal dragging on mousedown events πŸ–±

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to mousecase

react-native-pointer-interactions
Expose iPad mouse & trackpads interactions to React Native
Stars: ✭ 20 (-42.86%)
Mutual labels:  trackpad, mouse
ng-scrollable
Superamazing scrollbars for AngularJS
Stars: ✭ 58 (+65.71%)
Mutual labels:  scrolling, scrollbar
NoMouseAllowed
πŸ™…πŸ NoMouseAllowed discourages the use of the mouse on macOS
Stars: ✭ 25 (-28.57%)
Mutual labels:  mouse, mouse-events
linearmouse
πŸ–± The mouse and trackpad utility for Mac.
Stars: ✭ 1,151 (+3188.57%)
Mutual labels:  scrolling, mouse
react-is-scrolling
Simply detect if users are scrolling in your components in a declarative API
Stars: ✭ 17 (-51.43%)
Mutual labels:  scrolling, scrollbar
Mac Mouse Fix
Mac Mouse Fix - A simple way to make your mouse better.
Stars: ✭ 362 (+934.29%)
Mutual labels:  scrolling, mouse
PenTerm
Terminal config for pentesters.
Stars: ✭ 20 (-42.86%)
Mutual labels:  scrolling, mouse
react-scroll-locky
πŸ“œπŸ”’ – React full-cream "anti-scroll" library, you were looking for
Stars: ✭ 55 (+57.14%)
Mutual labels:  scrolling, scrollbar
V Bar
The virtual responsive crossbrowser scrollbar component for VueJS 2x
Stars: ✭ 216 (+517.14%)
Mutual labels:  scrolling, scrollbar
Dragscroll
micro library for drag-n-drop scrolling style
Stars: ✭ 989 (+2725.71%)
Mutual labels:  scrolling, mouse
render-props
㸚 Easy-to-use React state containers which utilize the render props (function as child) pattern
Stars: ✭ 33 (-5.71%)
Mutual labels:  scrolling, mouse-events
react-custom-scroller
Super simple React component for creating a custom scrollbar cross-browser and cross-devices.
Stars: ✭ 30 (-14.29%)
Mutual labels:  scrolling, scrollbar
Ayase
πŸ₯₯ Control everything by keyboard. Built for hackers and the blind.
Stars: ✭ 53 (+51.43%)
Mutual labels:  mouse
react-native-infinite-scroll
A simple implementation of infinite scrolling for React Native.
Stars: ✭ 19 (-45.71%)
Mutual labels:  scrolling
lime
A library for drawing graphics on the console screen
Stars: ✭ 32 (-8.57%)
Mutual labels:  mouse
sbb
Semantic Body Browser - a tool for graphically exploring an organism's body.
Stars: ✭ 31 (-11.43%)
Mutual labels:  mouse
Simplified-JNA
Multi-threaded JNA hooks and simplified library access to window/key/mouse functions.
Stars: ✭ 30 (-14.29%)
Mutual labels:  mouse-events
EasyScrollDots
Single page scroll JavaScript plugin that allows for vertical navigation of page sections
Stars: ✭ 38 (+8.57%)
Mutual labels:  scrolling
handy-scroll
Handy dependency-free floating scrollbar widget
Stars: ✭ 15 (-57.14%)
Mutual labels:  scrollbar
smooth-vuebar
Vue directive wrapper for smooth-scrollbar
Stars: ✭ 29 (-17.14%)
Mutual labels:  scrollbar

MouseCase

Mousecase πŸ–±

Typed with TypeScript npm version

Mousecase is a JavaScript utility supporting touch-like horizontal scrolling with a mouse! It is a no-nonsense, 0 dependency JavaScript plugin that solves 1 use case:

Scrolling a horizontal browser window plain with a mouse without using a scrollbar.

Synopsis

Being able to horizontally scroll is a default behavior on phones and with trackpads. With Mousecase, the archaic computer mouse pad can keep up! Yay. Users can click down on their computer mouse pad and drag scrollable horizontal browser window content without a scrollbar. This utility can help remove the need to implement a slider or carousel thingy. Therefore, it basically saves lives!

Setup

Install it!

yarn mousecase -D

Use it!

import mouseCase from 'mousecase'

const mousecase = mouseCase('some-selector')
mousecase.init()

That's it! Are you happier now that your customer can scroll horizontal web browser interfaces with a mouse pad just like they are on their phone? I hope so. If not, I'm not a shrink so I can't help you but I empathizeβ€”life's tough.

API

Listed below is the small API that Mousecase provides to use it.

MouseCase

MouseCase itself is a factory that takes in 2 arguments.

Arguments

target an string or node that is selected to use mousecase; is required

ex: mouseCase('some-target')

options: {object} containing plugin config

ex: mouseCase('some-target', { cssClass: 'mousecase-fun' })

  • activeClass the css class added to the mousecase target element when mousecase is active

  • cssClass: the css class added to the mousecase target element

  • el the formatted target element

  • rule: a boolean rule that defines whether mousecase should run (or not)

  • all props are added as defaults if not provided during setup

Methods

init() initiates mousecase (setup).

ex: someMouseCaseInstance.init()

on() turns mousecase back on (after initiation)

ex: someMouseCaseInstance.on()

off() turns mousecase off (after initiation)

ex: someMouseCaseInstance.off()

  • There are other methods used within Mousecase but not intended for general use

Demos

Listed below is a basic Mousecase demo. Feel free to share more.

  • Bill Murray CodePen
  • Please submit a PR with your demo here. πŸ’•
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].