A Mapbox React component.


0.5.63 years ago4 years agoMinified + gzip package size for @mapbox/react-popover-trigger in KB



Interact with the content of a PopoverTrigger to open and close a Popover.

This component internally manages the open-closed state of the Popover. If you want to manage it yourself, use react-popover directly.

respondsToClick, respondsToHover, and respondsToFocus props determine the means of opening and closing the Popover with interactions. If you open the Popover with a hover or focus, you can also close it by hovering away or blurring. If, however, you open the Popover with a click, you can only close it with another click, on the trigger or outside the Popover. If you've opened the Popover with a hover and then you click, it is then considered to be opened with a click and will only close with another click (not hovering away).


npm install @mapbox/react-popover-trigger


Please check propTypes in src/popover-trigger.js.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.