Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anuraglol/page-progressbar-react

🎉 A simple progressbar based on the scroll state of a page, as a react component.
https://github.com/anuraglol/page-progressbar-react

Last synced: 11 days ago
JSON representation

🎉 A simple progressbar based on the scroll state of a page, as a react component.

Awesome Lists containing this project

README

        

# âš¡ [Page Progressbar React](https://www.npmjs.com/package/page-progressbar-react)

💡 A Simple progressbar based on scroll state of a page using [framer-motion](https://www.framer.com/motion/)

👀 Demo (https://page-progressbar-react.vercel.app/)

## Installation

```
npm i page-progressbar-react
or
yarn add page-progressbar-react
```

## Usage

You can import the `PageProgressBar` component from the package after installing.

```jsx
import PageProgressBar from "page-progressbar-react";
```

After importing, add `` to your desired page.

```jsx
-pages / index.js;
import PageProgressBar from "page-progressbar-react";

export default function HomePage() {
return (
<>

{/* Your code here... */}
>
);
}
```

## Customization

Currently `PageProgressBar` supports `color` and `height` props.

```jsx
export default function HomePage() {
return (
<>

{/* Your code here... */}
>
);
}
```

## Props:

| prop | type | default |
| ------ | ------ | ------- |
| color | string | #ec4899 |
| height | number | 4px |

## Author

- [Portfolio](https://anurag.tech)
- [GitHub](https://github.com/kr-anurag)
- [Twitter](https://twitter.com/imanuraglol)