This is a major release, containing breaking changes that was long time coming.
Improvements:
- The implementation is now in TypeScript and the types are exported together with the package - no need to install @types/react-custom-scroll anymore.
- react-custom-scroll now supports React 18.
- Rewritten the whole build infra, using Vite.
- Moved to styled components - no need to add the customScroll css file to your code.
- Upgraded demo page including multiple use cases
- Bug fix - blocking outer scroll behavior
- Bug fix - nested react-custom-scroll elements that caused the handle to appear on all of them
- Switched from karma test runner to Playwright (still in progress to achieve higher coverage)
Migrating from v5 or earlier
Remove react-custom-scroll css file from your project
Switch to named import
import { CustomScroll } from "react-custom-scroll";
Enjoy