A customizable React scrollbar component that supports both vertical and horizontal scrolling with drag functionality.
npm install flowscrollbarA customizable React scrollbar component that supports both vertical and horizontal scrolling with drag functionality.
You can install this package via npm:
``sh`
npm i flowscrollbar
`jsx
import React from "react";
import Scrollbar from "flowscrollbar";
Scrollable Content...
function App() {
return (
{/ Your scrollable content here /}
);
}
export default App;
`
| Prop | Type | Description |
|-------------------|----------|-------------|
| height | number | Sets the height of the scrollbar container. |width
| | number | Sets the width of the scrollbar container. |style
| | object | Custom styling for the scrollbar track and thumb. |onScrollYEnd
| | func | Callback when vertical scrolling reaches the end. |onScrollXEnd
| | func | Callback when horizontal scrolling reaches the end. |beforeEndOffset
| | number | Offset before triggering onScrollYEnd or onScrollXEnd. |onScroll
| | func` | Callback triggered on scroll events. |
- Customizable scrollbar appearance
- Drag functionality for scrolling
- Supports both vertical and horizontal scrolling
- Triggers events when reaching scroll limits
- Fully responsive
Contributions are welcome! Feel free to submit a pull request or open an issue.
Developed by Akshay Soni