{"id":21891954,"url":"https://github.com/capsidjs/capsid-popper","last_synced_at":"2025-03-22T03:21:43.502Z","repository":{"id":57194197,"uuid":"124667853","full_name":"capsidjs/capsid-popper","owner":"capsidjs","description":"🎈 popper as capsid module :pill:","archived":false,"fork":false,"pushed_at":"2020-03-07T11:46:33.000Z","size":202,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-27T07:44:22.145Z","etag":null,"topics":["capsid","frontend","javascript","layout","popper"],"latest_commit_sha":null,"homepage":"https://npm.im/capsid-popper","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/capsidjs.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}},"created_at":"2018-03-10T15:21:04.000Z","updated_at":"2020-03-07T11:46:34.000Z","dependencies_parsed_at":"2022-09-01T23:41:03.343Z","dependency_job_id":null,"html_url":"https://github.com/capsidjs/capsid-popper","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsidjs%2Fcapsid-popper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsidjs%2Fcapsid-popper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsidjs%2Fcapsid-popper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsidjs%2Fcapsid-popper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capsidjs","download_url":"https://codeload.github.com/capsidjs/capsid-popper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244900131,"owners_count":20528637,"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":["capsid","frontend","javascript","layout","popper"],"created_at":"2024-11-28T12:46:19.062Z","updated_at":"2025-03-22T03:21:43.478Z","avatar_url":"https://github.com/capsidjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# capsid-popper v2.0.0\n\n[![CircleCI](https://circleci.com/gh/capsidjs/capsid-popper.svg?style=svg)](https://circleci.com/gh/capsidjs/capsid-popper)\n[![codecov](https://codecov.io/gh/capsidjs/capsid-popper/branch/master/graph/badge.svg)](https://codecov.io/gh/capsidjs/capsid-popper)\n\n\n\u003e [capsid][] component for [popper][]\n\npeer dependency: capsid \u003e= 0.20.2, popper.js ^1.12.9\n\n# Install\n\n    npm install --save capsid-popper capsid popper.js\n\n# Usage\n\nInstall the module to capsid:\n\n```js\ncapsid.install(require('capsid-popper'))\n```\n\nThen place `popper` component:\n\n```html\n\u003cdiv class=\"popper\" data-popper-placement=\"left\" data-popper-ref=\"#target\"\u003e...\u003c/div\u003e\n```\n\nThis element works as a popper to the reference element with the given placement.\n\nSee [popper document][popper] for available placements.\n\n# Options\n\nSome install options are available.\n\n```js\ncapsid.install(require('capsid-popper'), { name: 'name-of-popper-component' })\n```\n\n`name` property specifies the name of the component. Default `popper`. For example, if you pass `{ name: 'my-popper' }`, your popper component should be `\u003cdiv class=\"my-popper\" ...\u003e\u003c/div\u003e`.\n\n# Events\n\n## `popper-update`\n\nDispatching `popper-update` event on `popper` components causes the update of the position calculation:\n\n```\ndocument.querySelectorAll('.popper').forEach(el =\u003e {\n  el.dispatchEvent(new CustomEvent('popper-update'))\n})\n```\n\nThe above example updates all the popper components' layouts.\n\nThis is useful when you want to change the ref, the placement, or any other configuration of the component.\n\n# History\n\n- 2019-04-04 v2.0.0 Add `data-popper-modifiers`. Remove `data-popper-prevent-overflow` and `data-popper-flip`.\n- 2019-04-04 v1.6.0 Add `data-popper-flip`.\n- 2019-04-04 v1.5.0 Add `data-popper-prevent-overflow`.\n\n# License\n\nMIT\n\n[capsid]: https://capsid.js.org\n[popper]: https://popper.js.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapsidjs%2Fcapsid-popper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapsidjs%2Fcapsid-popper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapsidjs%2Fcapsid-popper/lists"}