Ariakit
/

useMenubarContext

Returns the menubar store from the nearest menubar container.

Code examples

function Menubar() {
const store = useMenubarContext();
if (!store) {
throw new Error("Menubar must be wrapped in MenubarProvider");
}
// Use the store...
}

Stay tuned

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

No spam. Unsubscribe anytime. Read latest issue