Anatomy of nested menus

In this example, we created a higher-level abstraction of the Menu component that automatically renders a MenuButton as a MenuItem if there's a parent menu store. This way, you can easily copy and paste it into your project.

However, in practice, creating submenus with Ariakit is as straightforward as nesting Menu components and merging MenuButton and MenuItem into a single element using the render prop:

Stay tuned

Join 1,000+ subscribers and receive monthly tips & updates on new Ariakit content.

No spam. Unsubscribe anytime. Read latest issue