React color scroll
React color scroll is a simple component which allows you to blend between colors as you're scrolling down the page. You can use it to fill an entire page, or within a wrapped container. ✨
Install
npm i -S react-color-scroll
Usage
import React from 'react'import ColorScroll from 'react-color-scroll' PureComponent { return <ColorScroll = ='my-color-scroll' // 'color-scroll' = // > /* Your site content in here */ </ColorScroll> }
It works by splitting up the container's scroll height and calculating the correct time to blend between colors for each color to have an equal percentage of your content.