https://github.com/nxroot/react-mega-scroll
React full page scrolling
https://github.com/nxroot/react-mega-scroll
react scroll typescript
Last synced: about 1 year ago
JSON representation
React full page scrolling
- Host: GitHub
- URL: https://github.com/nxroot/react-mega-scroll
- Owner: NxRoot
- Created: 2024-08-17T07:20:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-08T12:43:40.000Z (over 1 year ago)
- Last Synced: 2025-03-31T06:32:00.361Z (about 1 year ago)
- Topics: react, scroll, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/react-mega-scroll
- Size: 43 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Mega Scroll
This is a react component to provide full page scrolling.

## Demo
[](https://77t7mc.csb.app/)
## Install
```sh
npm i react-mega-scroll
```
## Usage
```ts
import MegaScroll from 'react-mega-scroll';
function App() {
return (
// add pages to render here
)
}
export default App
```
## Example
```ts
import React, { useState } from "react";
import MegaScroll from "react-mega-scroll";
const styles: React.CSSProperties = {
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
fontSize: "60px",
textAlign: "center",
color: "white",
};
function App() {
const [active, setActive] = useState(0);
return (
react-mega-scroll
Smooth Scrolling
Keyboard Support
State Listeners
Free Forever
);
}
export default App;
```
## Props
name
type
current value
description
children
any
Elements inside this component
onChange
function
Event called when page changes
noFocus
boolean
false
Prevent auto focus at first render
threshold
number
0.5
Debounce time between states