{"id":13400600,"url":"https://github.com/airbnb/rheostat","last_synced_at":"2026-10-19T11:51:24.556Z","repository":{"id":46283938,"uuid":"47292486","full_name":"airbnb/rheostat","owner":"airbnb","description":"Rheostat is a www, mobile, and accessible slider component built with React","archived":false,"fork":false,"pushed_at":"2024-04-12T15:02:04.000Z","size":1227,"stargazers_count":1687,"open_issues_count":67,"forks_count":185,"subscribers_count":42,"default_branch":"master","last_synced_at":"2026-10-16T15:54:55.986Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/airbnb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-02T22:28:26.000Z","updated_at":"2026-10-13T18:59:17.000Z","dependencies_parsed_at":"2024-01-13T19:34:30.958Z","dependency_job_id":"e249572b-2adb-41aa-a72a-01087ad36b40","html_url":"https://github.com/airbnb/rheostat","commit_stats":{"total_commits":183,"total_committers":26,"mean_commits":7.038461538461538,"dds":0.6174863387978142,"last_synced_commit":"d0d5ffab7cf4b393a1d1932ef76f389156b5c1fd"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/airbnb/rheostat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2Frheostat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2Frheostat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2Frheostat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2Frheostat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/airbnb","download_url":"https://codeload.github.com/airbnb/rheostat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2Frheostat/sbom","scorecard":{"id":173419,"data":{"date":"2025-08-11","repo":{"name":"github.com/airbnb/rheostat","commit":"d0d5ffab7cf4b393a1d1932ef76f389156b5c1fd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":4,"reason":"Found 5/12 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/airbnb/.github/SECURITY.md:1","Info: Found linked content: github.com/airbnb/.github/SECURITY.md:1","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy","Info: Found text in security policy: github.com/airbnb/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T17:08:11.986Z","repository_id":46283938,"created_at":"2025-08-16T17:08:11.987Z","updated_at":"2025-08-16T17:08:11.987Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38356429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-19T02:00:06.414Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2024-07-30T19:00:53.781Z","updated_at":"2026-10-19T11:51:24.266Z","avatar_url":"https://github.com/airbnb.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Uncategorized","📦 Legacy \u0026 Inactive Projects","React [🔝](#readme)"],"sub_categories":["Uncategorized"],"readme":"# Rheostat\n\n\u003e A mobile, tablet, desktop, and accessible slider for the web.\n\n![Rheostat demo](sample.gif)\n\n## Install\n\n`npm install rheostat`\n\n## Initialize\n\nAs of v3.0.0, the `rheostat` project relies on `react-with-styles`. If you want to continue using CSS stylesheets and classes, there is a little bit of extra set-up required to get things going. As such, you need to use to use `rheostat/initialize` to set up class names on your components.\n\n    import 'rheostat/initialize';\n\nFor example, the above import should go at the top of your application as you won't be able to import `rheostat` with it.\n\n## Props\n\nThe algorithm, by default [`linear`](src/algorithms/linear.js), the slider will use. Feel free to write\nyour own as long as it conforms to the shape.\n\n```js\n  algorithm: PropTypes.shape({\n    getValue: PropTypes.func,\n    getPosition: PropTypes.func,\n  })\n```\n\nCustom class name that will be applied to the root of Rheostat.\n\n```js\n  className: PropTypes.string\n```\n\nCustom React component overrides for the handles, background, and the \"progress\" bar.\n\n```js\n  background: PropTypes.oneOfType([PropTypes.func, PropTypes.string])\n  handle: PropTypes.oneOfType([PropTypes.func, PropTypes.string])\n  progressBar: PropTypes.oneOfType([PropTypes.func, PropTypes.string])\n```\n\nThe maximum and minimum possible values, by default 0 - 100.\n\n```js\n  max: PropTypes.number\n  min: PropTypes.number\n```\n\n`pitComponent` is a custom React component for rendering \"pits\" across the bar.\n`pitPoints` is the set of points at which it will render a pit. Points are an array\nof `values` on the slider.\n\n```js\n  pitComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.string])\n  pitPoints: PropTypes.arrayOf(PropTypes.number)\n```\n\nNOTE: `onChange` is called whenever the value is changed and committed. This happens at the end of\na drag, keypress, or click event. `onChange` is recommended when you wish to persist the values.\n\n`onValuesUpdated` is a convenience event that is triggered while the value is being actively\nchanged. This includes dragging, click, or keypress. `onValuesUpdated` is recommended if you need\nto work with the values before they're committed.\n\nIf you need to perform custom logic to postprocess the handle position, `getNextHandlePosition` accepts\na callback of the form `(handleIdx: int, percentPosition: float) =\u003e float`. Return the updated\nhandle position. This is useful if you need to customize ranges within a single slider.\n\n```js\n  onChange: PropTypes.func\n  onClick: PropTypes.func\n  onKeyPress: PropTypes.func\n  onSliderDragEnd: PropTypes.func\n  onSliderDragMove: PropTypes.func\n  onSliderDragStart: PropTypes.func\n  onValuesUpdated: PropTypes.func\n  getNextHandlePosition: PropTypes.func\n```\n\n`snap` is a boolean which controls the slider's snapping behavior.\n`snapPoints` is an array of `values` on the slider where the slider should snap to.\n\nIf `snap` is set to true and no `snapPoints` are set then the slider is snapped into an absolute\nposition. For example, on a scale of 1-10 if the slider is let go at the 54% mark it'll pick the\nvalue 5 and snap to 50%.\n\n```js\n  snap: PropTypes.bool\n  snapPoints: PropTypes.arrayOf(PropTypes.number)\n```\n\nThe values, by default 0 and 100.\n\n```js\n  values: PropTypes.arrayOf(PropTypes.number)\n```\n\nYou can disable the slider to prevent the user from moving it.\n\n```js\n  disabled: PropTypes.bool\n```\n\n## Usage\n\n\u003e Important: Make sure to include the [css file](https://unpkg.com/rheostat@3/css/rheostat.css) or feel free to create your own.\n\n* Simple.\n\n```js\nimport Rheostat from 'rheostat';\n\nReactDOM.render(\u003cRheostat /\u003e, document.getElementById('slider-root'));\n```\n\n* A slider with a multiple handles.\n\n```js\nimport Rheostat from 'rheostat';\n\nReactDOM.render((\n  \u003cRheostat\n    min={1}\n    max={100}\n    values={[1, 100]}\n  /\u003e\n), document.getElementById('slider-root'));\n```\n\n### Advanced Styling\n\nThe `rheostat/initialize` script actually relies on [react-with-styles-interface-css](https://github.com/airbnb/react-with-styles-interface-css) under the hood. If you are interested in a different solution for styling in your project, you can do your own initialization of a another [interface](https://github.com/airbnb/react-with-styles/blob/master/README.md#interfaces). At Airbnb, for instance, we rely on [Aphrodite](https://github.com/Khan/aphrodite) under the hood and therefore use the Aphrodite interface for `react-with-styles`. If you want to do the same, you would use the following pattern:\n```js\nimport ThemedStyleSheet from 'react-with-styles/lib/ThemedStyleSheet';\nimport aphroditeInterface from 'react-with-styles-interface-aphrodite';\nimport DefaultTheme from 'rheostat/lib/themes/DefaultTheme';\n\nThemedStyleSheet.registerInterface(aphroditeInterface);\nThemedStyleSheet.registerTheme(DefaultTheme);\n```\n\nThe above code has to be run before any `rheostat` component is imported. Otherwise, you will get an error. Also note that if you register any custom interface manually, you *must* also manually register a theme.\n\n### Theming\n`rheostat` also now supports a different way to theme. You can see the default theme values in [this file](https://github.com/airbnb/rheostat/blob/master/src/themes/DefaultTheme.js) and you would override them in the following manner:\n```js\nimport ThemedStyleSheet from 'react-with-styles/lib/ThemedStyleSheet';\nimport aphroditeInterface from 'react-with-styles-interface-aphrodite';\nimport DefaultTheme from 'rheostat/lib/themes/DefaultTheme';\n\nThemedStyleSheet.registerInterface(aphroditeInterface);\nThemedStyleSheet.registerTheme({\n  rheostat: {\n    ...DefaultTheme.rheostat,\n    color: {\n      ...DefaultTheme.rheostat.color,\n      progressBar: 'red',\n    },\n  },\n});\n```\n\nThe above code would make the default progress bar red, instead of light blue. Note that you *must* register an interface if you manually register a theme. One will not work without the other.\n\n#### A note on using `react-with-styles-interface-css`\nThe default interface that `rheostat` ships with is the [CSS interface](https://github.com/airbnb/react-with-styles-interface-css). If you want to use this interface along with the theme registration method, you will need to rebuild the core `rheostat.css` file. We do not currently expose a utility method to build this file, but you can follow along with the code in https://github.com/airbnb/rheostat/blob/master/scripts/buildCSS.js to build your own custom themed CSS file.\n\n### RTL Support\n\n`rheostat` now supports automatic RTL rendering through [`react-with-direction`](https://github.com/airbnb/react-with-direction).\n\n## Live Playground\n\nFor more examples you can check out the storybook.\n\n* Clone this repo on your machine.\n* `npm install`\n* `npm run storybook`\n* Visit `http://localhost:9001/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairbnb%2Frheostat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fairbnb%2Frheostat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairbnb%2Frheostat/lists"}