{"id":15761558,"url":"https://github.com/lucafalasco/preact-custom-scrollbars","last_synced_at":"2025-07-21T15:02:59.444Z","repository":{"id":57329473,"uuid":"83325501","full_name":"lucafalasco/preact-custom-scrollbars","owner":"lucafalasco","description":"⇅ Preact scrollbars component","archived":false,"fork":false,"pushed_at":"2017-03-14T18:20:10.000Z","size":71,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T22:46:49.195Z","etag":null,"topics":["preact","preact-components","scrollbars","scrolling"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/lucafalasco.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-27T15:28:29.000Z","updated_at":"2024-01-13T04:38:20.000Z","dependencies_parsed_at":"2022-09-14T18:40:23.366Z","dependency_job_id":null,"html_url":"https://github.com/lucafalasco/preact-custom-scrollbars","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lucafalasco/preact-custom-scrollbars","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafalasco%2Fpreact-custom-scrollbars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafalasco%2Fpreact-custom-scrollbars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafalasco%2Fpreact-custom-scrollbars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafalasco%2Fpreact-custom-scrollbars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucafalasco","download_url":"https://codeload.github.com/lucafalasco/preact-custom-scrollbars/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafalasco%2Fpreact-custom-scrollbars/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266324352,"owners_count":23911226,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["preact","preact-components","scrollbars","scrolling"],"created_at":"2024-10-04T11:03:03.321Z","updated_at":"2025-07-21T15:02:59.406Z","avatar_url":"https://github.com/lucafalasco.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"preact-custom-scrollbars\n=========================\n\nThis is a port of malte-wessel's  [react-custom-scrollbars](https://github.com/malte-wessel/react-custom-scrollbars) for [Preact](https://github.com/developit/preact)\n\n\n[![npm](https://img.shields.io/badge/npm-preact--custom--scrollbars-brightgreen.svg?style=flat-square)](https://www.npmjs.com/package/preact-custom-scrollbars)\n[![npm version](https://img.shields.io/npm/v/preact-custom-scrollbars.svg?style=flat-square)](https://www.npmjs.com/package/preact-custom-scrollbars)\n[![npm downloads](https://img.shields.io/npm/dm/preact-custom-scrollbars.svg?style=flat-square)](https://www.npmjs.com/package/preact-custom-scrollbars)\n\n* frictionless native browser scrolling\n* native scrollbars for mobile devices\n* [fully customizable](https://github.com/lucafalasco/preact-custom-scrollbars/blob/master/docs/customization.md)\n* [auto hide](https://github.com/lucafalasco/preact-custom-scrollbars/blob/master/docs/usage.md#auto-hide)\n* [auto height](https://github.com/lucafalasco/preact-custom-scrollbars/blob/master/docs/usage.md#auto-height)\n* [universal](https://github.com/lucafalasco/preact-custom-scrollbars/blob/master/docs/usage.md#universal-rendering) (runs on client \u0026 server)\n* `requestAnimationFrame` for 60fps\n* no extra stylesheets\n* well tested, 100% code coverage\n\n**[Documentation](https://github.com/lucafalasco/preact-custom-scrollbars/tree/master/docs)**\n\n## Installation\n```bash\nnpm install preact-custom-scrollbars --save\n```\nor\n```bash\nyarn add preact-custom-scrollbars\n```\n\nThis assumes that you’re using [npm](http://npmjs.com/) or [yarn](https://yarnpkg.com/lang/en/) package manager with a module bundler like [Webpack](http://webpack.github.io) or [Browserify](http://browserify.org/) to consume [CommonJS modules](http://webpack.github.io/docs/commonjs.html).\n\nIf you don’t yet use [npm](http://npmjs.com/) or a modern module bundler, and would rather prefer a single-file [UMD](https://github.com/umdjs/umd) build that makes `PreactCustomScrollbars` available as a global object, you can grab a pre-built version from [unpkg](https://unpkg.com/preact-custom-scrollbars/dist/preact-custom-scrollbars.js). We *don’t* recommend this approach for any serious application, as most of the libraries complementary to `preact-custom-scrollbars` are only available on [npm](http://npmjs.com/).\n\n## Usage\n\nThis is the minimal configuration. [Check out the Documentation for advanced usage](https://github.com/lucafalasco/preact-custom-scrollbars/tree/master/docs).\n\n```javascript\nimport { Scrollbars } from 'preact-custom-scrollbars';\n\nclass App extends Component {\n  render() {\n    return (\n      \u003cScrollbars style={{ width: 500, height: 300 }}\u003e\n        \u003cp\u003eSome great content...\u003c/p\u003e\n      \u003c/Scrollbars\u003e\n    );\n  }\n}\n```\n\nThe `\u003cScrollbars\u003e` component is completely customizable. Check out the following code:\n\n```javascript\nimport { Scrollbars } from 'preact-custom-scrollbars';\n\nclass CustomScrollbars extends Component {\n  render() {\n    return (\n      \u003cScrollbars\n        onScroll={this.handleScroll}\n        onScrollFrame={this.handleScrollFrame}\n        onScrollStart={this.handleScrollStart}\n        onScrollStop={this.handleScrollStop}\n        onUpdate={this.handleUpdate}\n        renderView={this.renderView}\n        renderTrackHorizontal={this.renderTrackHorizontal}\n        renderTrackVertical={this.renderTrackVertical}\n        renderThumbHorizontal={this.renderThumbHorizontal}\n        renderThumbVertical={this.renderThumbVertical}\n        autoHide\n        autoHideTimeout={1000}\n        autoHideDuration={200}\n        autoHeight\n        autoHeightMin={0}\n        autoHeightMax={200}\n        thumbMinSize={30}\n        universal={true}\n        {...this.props}\u003e\n    );\n  }\n}\n```\n\nAll properties are documented in the [API docs](https://github.com/lucafalasco/preact-custom-scrollbars/blob/master/docs/API.md)\n\n## Tests\n```bash\n# Make sure that you've installed the dependencies\nnpm install\n# Run tests\nnpm test\n```\n\n### Code Coverage\n```bash\n# Run code coverage. Results can be found in `./coverage`\nnpm run test:cov\n```\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucafalasco%2Fpreact-custom-scrollbars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucafalasco%2Fpreact-custom-scrollbars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucafalasco%2Fpreact-custom-scrollbars/lists"}