{"id":13795210,"url":"https://github.com/shwilliam/react-rubber-slider","last_synced_at":"2025-07-22T09:32:46.476Z","repository":{"id":39515665,"uuid":"266907657","full_name":"shwilliam/react-rubber-slider","owner":"shwilliam","description":"〰️ A springy React range input","archived":false,"fork":false,"pushed_at":"2023-01-07T18:32:50.000Z","size":1230,"stargazers_count":33,"open_issues_count":31,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T01:41:33.949Z","etag":null,"topics":["component","d3","input","range","reach-ui","react","slider","typescript"],"latest_commit_sha":null,"homepage":"https://codesandbox.io/s/gifted-shannon-qed9g?fontsize=14\u0026hidenavigation=1\u0026theme=dark","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/shwilliam.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":"2020-05-26T00:29:29.000Z","updated_at":"2024-03-30T00:51:17.000Z","dependencies_parsed_at":"2023-02-07T20:46:36.464Z","dependency_job_id":null,"html_url":"https://github.com/shwilliam/react-rubber-slider","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/shwilliam/react-rubber-slider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shwilliam%2Freact-rubber-slider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shwilliam%2Freact-rubber-slider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shwilliam%2Freact-rubber-slider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shwilliam%2Freact-rubber-slider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shwilliam","download_url":"https://codeload.github.com/shwilliam/react-rubber-slider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shwilliam%2Freact-rubber-slider/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266465246,"owners_count":23933094,"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-22T02:00:09.085Z","response_time":66,"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":["component","d3","input","range","reach-ui","react","slider","typescript"],"created_at":"2024-08-03T23:00:53.331Z","updated_at":"2025-07-22T09:32:46.413Z","avatar_url":"https://github.com/shwilliam.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# \\\u003cRubberSlider/\\\u003e\n\n![Demo screengrab](https://user-images.githubusercontent.com/38357771/86651082-16ff8480-bf98-11ea-822a-74bf6323b8b7.gif)\n\n## Installation\n\n```shell\n$ npm i @shwilliam/react-rubber-slider\n$ npm i @reach/slider d3\n```\n\n## Usage\n\n```jsx\nimport React, {useState} from 'react'\nimport RubberSlider from '@shwilliam/react-rubber-slider'\nimport '@shwilliam/react-rubber-slider/dist/styles.css'\n\nexport const App = () =\u003e {\n  const [value, setValue] = useState(0.5)\n\n  return \u003cRubberSlider width={250} value={value} onChange={setValue} /\u003e\n}\n```\n\n[![@shwilliam/react-rubber-slider demo](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/gifted-shannon-qed9g?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\n## Component API\n\n| Prop         | Type     | Required | Default         |\n| ------------ | -------- | -------- | --------------- |\n| name         | string   | false    | undefined       |\n| id           | string   | false    | 'rubber-slider' |\n| value        | number   | false    | 0               |\n| onChange     | function | false    | no-op           |\n| width        | number   | false    | 200             |\n| height       | number   | false    | 100             |\n| max          | number   | false    | 100             |\n| min          | number   | false    | 0               |\n| step         | number   | false    | 1               |\n| easeFunction | function | false    | d3.easeElastic  |\n| easeDuration | number   | false    | 700             |\n| onDragStart  | function | false    | no-op           |\n| onDrag       | function | false    | no-op           |\n| onDragEnd    | function | false    | no-op           |\n\n## Styling\n\nOverride the default slider styles by targeting the following:\n\n```css\n.rubber-slider {\n}\n.rubber-slider-input {\n}\n.rubber-slider-pseudo-track {\n}\n.rubber-slider-pseudo-handle {\n}\n```\n\n## Development\n\nTo start local development, simply install npm dependencies (`npm i`) and run `npm run build:watch` to watch ts files in `src/`. Built files can be found in `dist/`.\n\n## Testing\n\nTo run existing tests locally, run the command `npm t`, or `npm run test:watch` for watch mode.\n\n## Demo\n\nTo run the demo, ensure you have run the build script and have a `dist` dir in your project root. Then run `npm run demo:setup` to copy these to the demo and `npm run demo` to start it locally.\n\n## Contributing\n\nThis project is open to and encourages contributions! Feel free to discuss any bug fixes/features in the [issues](https://github.com/shwilliam/react-rubber-slider/issues). If you wish to work on this project:\n\n1. Fork [this project](https://github.com/shwilliam/react-rubber-slider)\n2. Create a branch (`git checkout -b new-branch`)\n3. Commit your changes (`git commit -am 'add new feature'`)\n4. Push to the branch (`git push origin new-branch`)\n5. [Submit a pull request!](https://github.com/shwilliam/react-rubber-slider/pull/new/master)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshwilliam%2Freact-rubber-slider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshwilliam%2Freact-rubber-slider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshwilliam%2Freact-rubber-slider/lists"}