{"id":18523686,"url":"https://github.com/sonicdoe/measure-scrollbar","last_synced_at":"2025-04-09T11:31:43.563Z","repository":{"id":57293816,"uuid":"94911478","full_name":"sonicdoe/measure-scrollbar","owner":"sonicdoe","description":"Get the width of the browser scrollbar","archived":false,"fork":false,"pushed_at":"2018-09-23T16:59:08.000Z","size":41,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T05:13:43.143Z","etag":null,"topics":["0bsd","browser","es2015","es6-modules","esm","esmodules","javascript","scrollbar","semver"],"latest_commit_sha":null,"homepage":"https://sonicdoe.github.io/measure-scrollbar/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonicdoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-20T16:18:05.000Z","updated_at":"2022-02-17T17:53:21.000Z","dependencies_parsed_at":"2022-09-01T08:40:39.333Z","dependency_job_id":null,"html_url":"https://github.com/sonicdoe/measure-scrollbar","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicdoe%2Fmeasure-scrollbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicdoe%2Fmeasure-scrollbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicdoe%2Fmeasure-scrollbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicdoe%2Fmeasure-scrollbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonicdoe","download_url":"https://codeload.github.com/sonicdoe/measure-scrollbar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248031515,"owners_count":21036423,"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":["0bsd","browser","es2015","es6-modules","esm","esmodules","javascript","scrollbar","semver"],"created_at":"2024-11-06T17:37:07.488Z","updated_at":"2025-04-09T11:31:42.372Z","avatar_url":"https://github.com/sonicdoe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# measure-scrollbar\n\n\u003e Get the width of the browser scrollbar\n\n[Demo](https://sonicdoe.github.io/measure-scrollbar/)\n\n## Installation\n\n```\n$ npm install measure-scrollbar\n```\n\n## Usage\n\n```js\nimport measureScrollbar from 'measure-scrollbar'\n\nmeasureScrollbar()\n// =\u003e 15\n```\n\n`measureScrollbar()` returns the width of the browser scrollbar in pixels.\n\n### Module bundlers\n\nmeasure-scrollbar is primarily distributed as an ES module. Therefore, it works out of the box with [webpack](https://webpack.js.org), [Parcel](https://parceljs.org), and [Rollup](https://rollupjs.org) (even without [rollup-plugin-commonjs](https://github.com/rollup/rollup-plugin-commonjs)).\n\n[Browserify](http://browserify.org) does not support ES modules natively. To use measure-scrollbar with Browserify, you can require the CommonJS version using `require('measure-scrollbar/commonjs')`.\n\n## Browser support\n\nmeasure-scrollbar supports the latest releases of Chrome, Safari, Firefox, Microsoft Edge, and Opera.\n\nIf you require Internet Explorer support, use [Babel’s ES2015 arrow functions transform](https://babeljs.io/docs/plugins/transform-es2015-arrow-functions/).\n\n## Acknowledgments\n\nmeasure-scrollbar is based on David Walsh’s [Detect Scrollbar Width with JavaScript](https://davidwalsh.name/detect-scrollbar-width) article.\n\n## Changelog\n\nThis project follows [Semantic Versioning 2](http://semver.org/).\n\n- v1.1.0 (2018-06-09): Add CommonJS version\n- v1.0.0 (2017-07-25):\n  - Fully commit to Semantic Versioning\n  - Document official browser support\n- v0.1.0 (2017-06-20): Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonicdoe%2Fmeasure-scrollbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonicdoe%2Fmeasure-scrollbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonicdoe%2Fmeasure-scrollbar/lists"}