Ariakit
/

usePopoverContext

Returns the popover store from the nearest popover container.

Code examples

function Popover() {
const store = usePopoverContext();
if (!store) {
throw new Error("Popover must be wrapped in PopoverProvider");
}
// 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