Peekaboo is a minimal 2k library for viewport animations.
Peekaboo uses IntersectionObserver to check data-peekaboo items and adds a .peekabooed class if they are visible. For browsers without support it relies on requestAnimationFrame.
With that, you can do all the animations you want, controlling them with CSS.
Photo from unsplash