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

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

Awesome Lists containing this project

README

          

# React Mega Scroll

This is a react component to provide full page scrolling.

## Demo
[![Edit react-mega-scroll](https://codesandbox.io/static/img/play-codesandbox.svg)](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