Use <wa-intersection-observer> to easily add classes to elements when they appear in the viewport. No JavaScript required!