A lightweight library for making overflowing content fade out smoothly and dynamically.
npm install overfademask-image property to fade out the desired edges. This allows it to play nicely with transparency.- Horizontal fade
!Overfade example 1
- All-sides fade
!Overfade example 1
npm install overfade and initialize it using:js
import init from "overfade";
init();
`Applying the effect
To fade-out the desired overflowing edges, use the following classes. You can combine them.-
of-top: Dynamically fade out the top edge
- of-bottom: Dynamically fade out the bottom edge
- of-left: Dynamically fade out the left edge
- of-right: Dynamically fade out the right edgeTo control the length of the fade, use the
of-length-xclass. It defaults to 1, where 2 would be twice as long.Code example
`html
This is a horizontally overflowing container with a longer fade.
``