{"id":24013443,"url":"https://github.com/preachjs/popper","last_synced_at":"2025-04-15T09:43:28.130Z","repository":{"id":270835507,"uuid":"911607524","full_name":"preachjs/popper","owner":"preachjs","description":"micro positioning library","archived":false,"fork":false,"pushed_at":"2025-03-09T19:44:03.000Z","size":169,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T18:54:08.122Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://preachjs.github.io/popper/","language":"TypeScript","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/preachjs.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-03T12:18:21.000Z","updated_at":"2025-03-09T19:44:07.000Z","dependencies_parsed_at":"2025-01-03T12:46:29.356Z","dependency_job_id":"de8ab99c-1392-4594-a967-eff9a9193fbb","html_url":"https://github.com/preachjs/popper","commit_stats":null,"previous_names":["preachjs/popper"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preachjs%2Fpopper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preachjs%2Fpopper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preachjs%2Fpopper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preachjs%2Fpopper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preachjs","download_url":"https://codeload.github.com/preachjs/popper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249047335,"owners_count":21204234,"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":"2025-01-08T06:54:40.978Z","updated_at":"2025-04-15T09:43:28.091Z","avatar_url":"https://github.com/preachjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @preachjs/popper\n\n- [@preachjs/popper](#preachjspopper)\n  - [Highlights](#highlights)\n  - [Usage](#usage)\n    - [Installation](#installation)\n    - [Example](#example)\n    - [Plugins](#plugins)\n      - [Arrow](#arrow)\n  - [About](#about)\n  - [FAQ](#faq)\n  - [License](#license)\n\n## Highlights\n\n- Tiny\n  - Core is just under [4kb](https://sizesnap.barelyhuman.dev/@preachjs/popper)\n- 0 dependencies\n- Low Level\n\n## Usage\n\n### Installation\n\n\u003e [!NOTE]\n\u003e\n\u003e The module is **ESM Only**\n\n```sh\nnpm i @preachjs/popper\n```\n\n### Example\n\n```js\nimport { createPopper } from '@preachjs/popper'\n\nconst anchor = document.getElementById('anchor')\nconst popover = document.getElementById('menu')\n\nconst popper = createPopper(anchor, popover)\n\npopper.move('bottom', 'center').offset(2)\n\n// Doesn't do anything unless `.align` is called a.k.a, a Lazy API\npopper.align()\n```\n\n### Plugins\n\n#### Arrow\n\n```js\nimport { arrow } from '@preachjs/popper/arrow'\nimport { createPopper } from '@preachjs/popper'\n\nconst arrowElement = document.getElementById('arrow')\n\nconst popper = createPopper(anchor, popover)\npopper.use(arrow(arrowElement))\n\npopper.toggleArrow()\n// or\n// popper.toggleArrow(true) - will add a `data-popper-arrow-visible` property on the passed arrow element\n// popper.toggleArrow(false)\n\n// remaining code\n\npopper.align()\n```\n\n## About\n\n`popper` is a tiny low level vanilla javascript library built to support other\nUI components that preachjs wishes to build. It doesn't have magical behaviours\nand just manages semantic positioning.\n\nBehaviours would differ based on the UI component it's being used in and will\nnormally involve something like Preact(+Signals) that handle state\n\n## FAQ\n\n**Why not use X**?\n\nProbably too large of an API surface area or overall size which I wish to avoid,\nat least right now.\n\n**It's missing XYZ!**\n\nFeel free to raise feature requests, do know that the scope of the library\nitself is pretty small. You can always write plugins to extend it's behaviour.\n\n## License\n\n[MIT](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreachjs%2Fpopper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreachjs%2Fpopper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreachjs%2Fpopper/lists"}