It catches your scroll
Instead of letting the browser jump, the box catches each turn of the wheel or swipe and turns it into a place to go.
Where to go, where it is
It keeps two positions: where you asked to go, and where the content is now. The gap between them is the glide.
A little closer each frame
Many times a second, the content moves part of the way toward where you asked to go, so it speeds off and then eases in.
It slides the content
The content moves as one piece instead of being scrolled, which keeps the movement smooth.
Momentum comes free
Flick and let go: the content keeps gliding after your hand stops, then settles.
Mind the trade-offs
Taking over scrolling can break keyboard scrolling, links to headings and find-in-page. Use it with care, and turn it off for visitors who ask for less motion.