{"id":13450833,"url":"https://github.com/sandiiarov/use-popper","last_synced_at":"2025-03-23T16:32:26.904Z","repository":{"id":95061615,"uuid":"177242054","full_name":"sandiiarov/use-popper","owner":"sandiiarov","description":null,"archived":true,"fork":false,"pushed_at":"2020-07-10T15:40:15.000Z","size":783,"stargazers_count":37,"open_issues_count":7,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-07-31T07:15:50.711Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/sandiiarov.png","metadata":{"files":{"readme":"README.md","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":"2019-03-23T04:02:25.000Z","updated_at":"2023-08-15T16:07:08.000Z","dependencies_parsed_at":"2023-03-30T03:02:56.929Z","dependency_job_id":null,"html_url":"https://github.com/sandiiarov/use-popper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandiiarov%2Fuse-popper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandiiarov%2Fuse-popper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandiiarov%2Fuse-popper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandiiarov%2Fuse-popper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandiiarov","download_url":"https://codeload.github.com/sandiiarov/use-popper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221856481,"owners_count":16892448,"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":[],"created_at":"2024-07-31T07:00:39.068Z","updated_at":"2024-10-28T16:32:02.216Z","avatar_url":"https://github.com/sandiiarov.png","language":"TypeScript","funding_links":[],"categories":["Packages","TypeScript"],"sub_categories":[],"readme":"# Use Popper\n\n![npm](https://img.shields.io/npm/dt/use-popper.svg)\n![npm](https://img.shields.io/npm/v/use-popper.svg)\n![NpmLicense](https://img.shields.io/npm/l/use-popper.svg)\n\n## Installation\n\n\u003e Note: React 16.8+ is required for Hooks.\n\n### With npm\n\n```sh\nnpm i use-popper\n```\n\n### Or with yarn\n\n```sh\nyarn add use-popper\n```\n\n[![Edit usePopper](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/ww293zr265?fontsize=14)\n\n```js\nimport React from 'react';\nimport usePopper from 'use-popper';\nimport { useHover } from 'use-events';\n\nfunction Tooltip(props) {\n  const { reference, popper, arrow } = usePopper({ placement: 'bottom' });\n  const [active, bind] = useHover();\n\n  return (\n    \u003cdiv\u003e\n      \u003cbutton ref={reference.ref} {...bind}\u003e\n        hover me\n      \u003c/button\u003e\n      {active \u0026\u0026 (\n        \u003cdiv\n          ref={popper.ref}\n          style={popper.styles}\n          data-placement={popper.placement}\n        \u003e\n          \u003cdiv\u003eHello!\u003c/div\u003e\n          \u003cdiv ref={arrow.ref} style={arrow.styles} /\u003e\n        \u003c/div\u003e\n      )}\n    \u003c/div\u003e\n  );\n}\n\nexport default Tooltip;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandiiarov%2Fuse-popper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandiiarov%2Fuse-popper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandiiarov%2Fuse-popper/lists"}