JSPM

react-lite-scrollbar

0.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16
  • Score
    100M100P100Q101112F
  • License MIT

react-lite-scrollbar

Package Exports

  • react-lite-scrollbar

Readme

React Lite Scrollbar

GitHub license npm version

A lightweight and customizable scroll progress bar for React.

Installation

npm install react-lite-scrollbar

Basic Usage

import ScrollBar from 'react-lite-scrollbar';

export default function App() {
  return (
    <>
      <ScrollBar />
      {/* Your page content */}
      <div>
        <h1>Welcome</h1>
        ...
      </div>
    </>
  );
}

Props

Prop Type Default Description
height number | string 4 Height of the progress bar in pixels
bgColor string "#000" Background color of the progress bar
duration number | string 0.1 Transition duration in seconds for smooth animation

Examples

Custom Height

<ScrollBar height={8} />

Custom Color

<ScrollBar bgColor='#ff6b62' />

Custom Animation Duration

<ScrollBar duration={0.3} />