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...
}

Follow updates

Join 1,000+ subscribers and receive monthly updates with the latest improvements on API Reference.

Read latest issue

No Spam. Unsubscribe at any time.