When people talk about Intersection Observer, the most common use cases that come to mind are **Lazy loading Images **and Infinite Scroll. However Intersection Observer can be put to use in a lot more interactions.

In this post we are going to implement one such interaction, which is a **collapsible menu, **in which only the items that can take the available space will be shown upfront and rest will go inside the overflow menu.

#web-development #react #html #programming

Build a Collapsible Menu in React with Intersection Observer
1.45 GEEK