{"id":13494399,"url":"https://github.com/jasonkuhrt/react-popover","last_synced_at":"2025-04-12T17:40:02.224Z","repository":{"id":29663840,"uuid":"33205953","full_name":"jasonkuhrt/react-popover","owner":"jasonkuhrt","description":"A smart popover component for React","archived":false,"fork":false,"pushed_at":"2023-12-15T14:31:50.000Z","size":1645,"stargazers_count":599,"open_issues_count":97,"forks_count":240,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-24T15:57:19.682Z","etag":null,"topics":["javascript","react","ui-components"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jasonkuhrt.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-03-31T19:42:58.000Z","updated_at":"2025-03-24T02:02:30.000Z","dependencies_parsed_at":"2024-01-16T09:52:35.486Z","dependency_job_id":"76f26f06-3eed-435d-974d-769dc4b07b57","html_url":"https://github.com/jasonkuhrt/react-popover","commit_stats":{"total_commits":248,"total_committers":24,"mean_commits":"10.333333333333334","dds":"0.30645161290322576","last_synced_commit":"905e7545e32806abf8ee38f4557621e9bc5b1c1a"},"previous_names":["littlebits/react-popover"],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonkuhrt%2Freact-popover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonkuhrt%2Freact-popover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonkuhrt%2Freact-popover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonkuhrt%2Freact-popover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasonkuhrt","download_url":"https://codeload.github.com/jasonkuhrt/react-popover/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245343997,"owners_count":20599867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","react","ui-components"],"created_at":"2024-07-31T19:01:24.672Z","updated_at":"2025-03-27T17:18:21.525Z","avatar_url":"https://github.com/jasonkuhrt.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":":toc: macro\n:toc-title:\n:toclevels: 99\n\n# react-popover\n\nimage:https://travis-ci.org/littlebits/react-popover.svg?branch=master[\"Build Status\", link=\"https://travis-ci.org/littlebits/react-popover\"]\n\n\ntoc::[]\n\n\n\n## React Versions Support\n\n`react-popover` `\u003e= 0.5.0` supports React 16 while `react-popover` `\u003c 0.5.0` works with React `15.x.x` and likely lower. There is no plan to support older versions of this library with back-ported patches and PRs for that purpose are not welcome since it increases maintenance for the authors.\n\n## Installation\n\n```\nyarn add react-popover\n```\n\n## Examples\n\nLook at the link:https://littlebits.github.io/react-popover[stories in our storybook].\n\n## API\n\n### `export default` `Popover(props, target)`\n\n#### `props :: {...}`\n\n---\n\n##### `body :: Node | Array Node`\nThe `popover` content.\n\n---\n\n##### `isOpen :: Boolean`\nDetermines Whether or not the popover is rendered.\n\n---\n\n##### `preferPlace :: Enum String | Null`\nSets a ***preference*** of where to position the Popover. Only useful to specify placement in case of multiple available fits. Defaults to `null`. Valid values are:\n\n`above | right | below | left` :: Prefer an explicit side.\n`row | column` :: Prefer an orientation.\n`start | end` :: Prefer an order.\n`null` :: No preference, automatic resolution. This is the default.\n\n---\n\n##### `place :: String | Null`\nLike `preferPlace` except that the given place is a ***requirement***. The resolver becomes scoped or disabled. It is scoped if the `place` is an `orientation` or `order` but disabled if it is a `side`. For example `place: \"row\"` scopes the resolver to `above` or `below` placement but `place: \"above\"` removes any need for the resolver.\n\n---\n\n##### `onOuterAction :: (Event) -\u003e Void`\nA callback function executed every time the user does an action (`mousedown` or `touchstart`) outside the DOM tree of both `Popover` and `Target`. A canonical use-case is to automatically close the Popover on any external user action.\n\n---\n\n##### `refreshIntervalMs :: Number | Falsey`\nThe polling speed (AKA time between each poll) in milliseconds for checking if a layout refresh is required. This polling is required because it is the only robust way to track the position of a target in the DOM. Defaults to `200`. Set to a falsey value to disable.\n\n---\n\n#### `enterExitTransitionDurationMs :: Number | Falsey`\nThe amount of time in milliseconds that it takes to complete the enter and exit animation. Defaults to '500'.\n\n---\n\n#### `tipSize :: Number`\nDefines the size of the tip pointer.  Use .01 to disable tip.  Defaults to '7'.\n\n---\n\n##### Standard\n\n* Properties like `className` and `style`.\n\n\n---\n\n#### `target :: ReactElement`\n\n- The React Element that this popover will orient itself around. `target` `rendering tree` is unaffected. `Popover` _will_ become its `owner`.\n\n---\n\n#### `appendTarget :: DOMElement`\n\n- The DOM element which the https://reactjs.org/docs/portals.html[portal] will mount into. In effect the popover will become an appended child of this DOM element. Defaults to 'document.body'.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonkuhrt%2Freact-popover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasonkuhrt%2Freact-popover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonkuhrt%2Freact-popover/lists"}