1.0.4 • Published 1 year ago

cegz-react-scrollbar v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

cegz-react-scrollbar

A custom scroll bar component based on React.

Install

Install from the npm registry with your package manager:

npm install cegz-react-scrollbar
# or
yarn add cegz-react-scrollbar
# or
pnpm add cegz-react-scrollbar

Usage

import React from "react";
import ReactDOM from "react-dom/client";
import Scrollbar from "cegz-react-scrollbar";

function App() {
  return (
    <Scrollbar style={{ width: 800, height: 500, background: "aliceblue" }}>
      {new Array(20).fill(0).map((item, index) => (
        <li key={index} style={{ width: 1000, height: 50 }}>
          item {index + 1}
        </li>
      ))}
    </Scrollbar>
  );
}

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
  <React.Fragment>
    <App />
  </React.Fragment>
);
1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago