kysley / react-camber

A Small (renderless) component to loop back to the top of the page while scrolling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

camber 🏎
camber image

Automatically loop to the top of the page upon reaching the bottom

Installation

This module is distributed via npm which is bundled with node and should be installed as one of your project's dependencies:

npm install --save react-camber
yarn add react-camber

Usage

import React from 'react'
import ReactDOM from 'react-dom'
import {Camber} from 'react-camber'

const App = () => (
  <div style={{ height: '150vh' }}>
    <span>Scroll to the bottom of the page</span>
    <Camber />
  </div>
)

ReactDOM.render(<App />, document.getElementById('root'))

LICENSE

MIT

About

A Small (renderless) component to loop back to the top of the page while scrolling

License:MIT License


Languages

Language:TypeScript 81.8%Language:HTML 18.2%