1.0.7 • Published 5 months ago

flowscrollbar v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

Scrollbar Component

A customizable React scrollbar component that supports both vertical and horizontal scrolling with drag functionality.

Installation

You can install this package via npm:

npm i flowscrollbar

Usage

import React from "react";
import Scrollbar from "flowscrollbar";


function App() {
  return (
    <Scrollbar height={300} width={500} onScrollYEnd={() => console.log("Reached Y end!")}>
      <div style={{ width: "800px", height: "600px" }}>
        {/* Your scrollable content here */}
        <p>Scrollable Content...</p>
      </div>
    </Scrollbar>
  );
}

export default App;

Props

PropTypeDescription
heightnumberSets the height of the scrollbar container.
widthnumberSets the width of the scrollbar container.
styleobjectCustom styling for the scrollbar track and thumb.
onScrollYEndfuncCallback when vertical scrolling reaches the end.
onScrollXEndfuncCallback when horizontal scrolling reaches the end.
beforeEndOffsetnumberOffset before triggering onScrollYEnd or onScrollXEnd.
onScrollfuncCallback triggered on scroll events.

Features

  • Customizable scrollbar appearance
  • Drag functionality for scrolling
  • Supports both vertical and horizontal scrolling
  • Triggers events when reaching scroll limits
  • Fully responsive

Contributing

Contributions are welcome! Feel free to submit a pull request or open an issue.

Author

Developed by Akshay Soni

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago