{"id":13429618,"url":"https://github.com/tranbathanhtung/usePosition","last_synced_at":"2025-03-16T03:32:00.451Z","repository":{"id":131343699,"uuid":"155213195","full_name":"tranbathanhtung/usePosition","owner":"tranbathanhtung","description":"React hook for get position of element","archived":false,"fork":false,"pushed_at":"2018-10-29T13:06:29.000Z","size":63,"stargazers_count":23,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T20:11:08.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tranbathanhtung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-10-29T13:05:19.000Z","updated_at":"2023-03-09T04:15:13.000Z","dependencies_parsed_at":"2023-04-07T04:33:26.853Z","dependency_job_id":null,"html_url":"https://github.com/tranbathanhtung/usePosition","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/tranbathanhtung%2FusePosition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tranbathanhtung%2FusePosition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tranbathanhtung%2FusePosition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tranbathanhtung%2FusePosition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tranbathanhtung","download_url":"https://codeload.github.com/tranbathanhtung/usePosition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822309,"owners_count":20353496,"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-31T02:00:42.563Z","updated_at":"2025-03-16T03:32:00.189Z","avatar_url":"https://github.com/tranbathanhtung.png","language":"JavaScript","readme":"# `@rehooks/usePosition`\n\n\u003e React hook for ...\n\n\u003e **Note:** This is using the new [React Hooks API Proposal](https://reactjs.org/docs/hooks-intro.html)\n\u003e which is subject to change until React 16.7 final.\n\u003e\n\u003e You'll need to install `react`, `react-dom`, etc at `^16.7.0-alpha.0`\n\n## Install\n\n```sh\nyarn add @rehooks/usePosition\n```\n\n## Usage\n\n```js\nimport { useRef } from 'react';\nimport usePosition from '@rehooks/usePosition';\n\nfunction MyComponent() {\n  let ref = useRef(null);\n  let { left, top } = usePosition(ref);\n  return (\n    \u003cp ref={ref}\u003eHello Hooks: {JSON.stringify({left, top})}\u003c/p\u003e\n  );\n}\n```\n","funding_links":[],"categories":["Packages","React Hooks"],"sub_categories":["React Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftranbathanhtung%2FusePosition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftranbathanhtung%2FusePosition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftranbathanhtung%2FusePosition/lists"}