Skip to content

tajo/react-range

Repository files navigation

react-range

npm version npm downloads Build Status

See all the other examples and their source code!

Installation

yarn add react react-dom react-range

End to end testing

This library is tightly coupled to many DOM APIs. It would be very hard to write unit tests that would not involve a lot of mocking. Or we could re-architect the library to better abstract all DOM interfaces but that would mean more code and bigger footprint.

Instead of that, react-range is thoroughly tested by end to end tests powered by puppeteer. It tests all user interactions:

All tests are automatically ran in Travis CI with headless chromium. This way, the public API is well tested, including pixel-perfect positioning. Also, the tests are pretty fast, reliable and very descriptive.

Do you want to run them in the dev mode (slows down operations, opens the browser)?

yarn storybook #start the storybook server
yarn test:e2e:dev #run the e2e tests

CI mode (storybook started on the background, quick, headless)

yarn test:e2e

Browser support

  • Chrome (latest, mac, windows, iOS, Android)
  • Firefox (latest, mac, windows)
  • Safari (latest, mac, iOS)
  • Edge (latest, windows)
  • MSIE 11 (windows)

Contributing

This is how you can spin up the dev environment:

git clone https://github.com/tajo/react-range
cd react-range
yarn
yarn storybook

Shoutouts 🙏

Big big shoutout to Tom MacWright for donating the react-range npm handle! ❤️

BrowserStack Logo

Big thanks to BrowserStack for letting the maintainers use their service to debug browser issues.

Author

Vojtech Miksu 2019, miksu.cz, @vmiksu

About

🎚️Range input with a slider. Accessible. Bring your own styles and markup.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors