@mapbox/react-popover-trigger

0.5.6 • Public • Published

@mapbox/react-popover-trigger

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

Installation

npm install @mapbox/react-popover-trigger

Props

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

Readme

Keywords

none

Package Sidebar

Install

npm i @mapbox/react-popover-trigger

Weekly Downloads

2

Version

0.5.6

License

SEE LICENSE IN LICENSE_Mapbox

Unpacked Size

19.2 kB

Total Files

4

Last publish

Collaborators

  • mbx-npm-ci-production
  • mbx-npm-ci-staging
  • mbx-npm-advanced-actions-production
  • mbx-npm-advanced-actions-staging
  • mbx-npm-09-production
  • mbx-npm-08-production
  • mbx-npm-07-production
  • mbx-npm-06-production
  • mbx-npm-05-production
  • mbx-npm-04-production
  • mbx-npm-03-production
  • mbx-npm-02-production
  • mbx-npm-01-production
  • mbx-npm-02-staging
  • mapbox-npm-01
  • mapbox-npm-02
  • mapbox-npm-07
  • mapbox-npm-03
  • mapbox-npm-04
  • mapbox-npm-09
  • mapbox-npm-05
  • mapbox-npm-06
  • mapbox-npm-08
  • mapbox-npm-advanced-actions
  • mapbox-npm-ci
  • mapbox-npm
  • mapbox-admin
  • mapbox-machine-user