{"id":19006894,"url":"https://github.com/yowainwright/mousecase","last_synced_at":"2025-07-20T01:34:18.772Z","repository":{"id":38272770,"uuid":"77410720","full_name":"yowainwright/mousecase","owner":"yowainwright","description":"A JavaScript utility enabling horizontal dragging on mousedown events 🖱","archived":false,"fork":false,"pushed_at":"2024-07-18T13:41:54.000Z","size":2314,"stargazers_count":29,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T17:19:12.334Z","etag":null,"topics":["mouse","mouse-events","mouse-tracking","scrollbar","scrolling","trackpad"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yowainwright.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-26T22:51:44.000Z","updated_at":"2024-07-23T07:24:16.000Z","dependencies_parsed_at":"2024-11-08T18:38:14.702Z","dependency_job_id":"91730d2d-e13b-4d6d-998c-c763c8d060b2","html_url":"https://github.com/yowainwright/mousecase","commit_stats":{"total_commits":529,"total_committers":7,"mean_commits":75.57142857142857,"dds":0.7107750472589792,"last_synced_commit":"7f459b8fe584f7d9506bb4e939866689e206dff9"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/yowainwright/mousecase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fmousecase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fmousecase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fmousecase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fmousecase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yowainwright","download_url":"https://codeload.github.com/yowainwright/mousecase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fmousecase/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266053853,"owners_count":23869498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mouse","mouse-events","mouse-tracking","scrollbar","scrolling","trackpad"],"created_at":"2024-11-08T18:34:59.514Z","updated_at":"2025-07-20T01:34:18.751Z","avatar_url":"https://github.com/yowainwright.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![MouseCase](https://yowainwright.imgix.net/mousecase/mousecase.jpg?auto=format)\n\n# Mousecase 🖱\n\n![Typed with TypeScript](https://flat.badgen.net/badge/icon/Typed?icon=typescript\u0026label\u0026labelColor=blue\u0026color=555555)\n[![npm version](https://badge.fury.io/js/mousecase.svg)](https://badge.fury.io/js/mousecase)\n\nMousecase is a JavaScript utility supporting touch-like horizontal scrolling with a mouse!\nIt is a no-nonsense, 0 dependency JavaScript plugin that solves 1 use case:\n\n\u003e Scrolling a horizontal browser window plain with a mouse **without** using a scrollbar.\n\n## Synopsis\n\nBeing 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!\n\n## Setup\n\nInstall it!\n\n```javascript\n\nyarn mousecase -D\n\n```\n\nUse it!\n\n```javascript\n\nimport mouseCase from 'mousecase'\n\nconst mousecase = mouseCase('some-selector')\nmousecase.init()\n\n```\n\nThat'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.\n\n## API\n\nListed below is the small API that Mousecase provides to use it.\n\n### MouseCase\n\nMouseCase itself is a factory that takes in 2 arguments.\n\n#### `Arguments`\n\n**`target`** an `string` or `node` that is selected to use mousecase; is required\n\u003e **ex:** `mouseCase('some-target')`\n\n**`options`:** `{object}` containing plugin config\n\u003e **ex:** `mouseCase('some-target', { cssClass: 'mousecase-fun' })`\n\n- **`activeClass`** the css class added to the mousecase target element when mousecase is active\n- **`cssClass`:** the css class added to the mousecase target element\n- **`el`** the formatted target element\n- **`rule`:** a boolean rule that defines whether mousecase should run (or not)\n\n- all **`props`** are added as defaults if not provided during setup\n\n#### `Methods`\n\n**`init()`** initiates mousecase (setup).\n\u003e **ex:** `someMouseCaseInstance.init()`\n\n**`on()`** turns mousecase back on (after initiation)\n\u003e **ex:** `someMouseCaseInstance.on()`\n\n**`off()`** turns mousecase off (after initiation)\n\u003e **ex:** `someMouseCaseInstance.off()`\n\n- There are other methods used within Mousecase but not intended for general use\n\n## Demos\n\nListed below is a basic Mousecase demo. Feel free to share more.\n\n- Bill Murray [CodePen](https://codepen.io/yowainwright/pen/d2fa41088f4d40dd9dd55fa72d60441f)\n- Please submit a PR with your demo [here](/pulls). 💕\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyowainwright%2Fmousecase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyowainwright%2Fmousecase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyowainwright%2Fmousecase/lists"}