{"id":17242756,"url":"https://github.com/imcuttle/click-popup","last_synced_at":"2025-08-02T10:35:44.577Z","repository":{"id":33027120,"uuid":"150286785","full_name":"imcuttle/click-popup","owner":"imcuttle","description":"The interaction about funny popup animation","archived":false,"fork":false,"pushed_at":"2022-01-07T14:38:00.000Z","size":456,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-31T18:00:36.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/imcuttle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-09-25T15:19:07.000Z","updated_at":"2018-10-03T11:01:08.000Z","dependencies_parsed_at":"2022-08-07T19:30:27.901Z","dependency_job_id":null,"html_url":"https://github.com/imcuttle/click-popup","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/imcuttle/click-popup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fclick-popup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fclick-popup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fclick-popup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fclick-popup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imcuttle","download_url":"https://codeload.github.com/imcuttle/click-popup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fclick-popup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268372062,"owners_count":24239795,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-15T06:13:59.836Z","updated_at":"2025-08-02T10:35:44.541Z","avatar_url":"https://github.com/imcuttle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# click-popup\n\n\u003c!--[![Test coverage](https://img.shields.io/codecov/c/github/imcuttle/click-popup.svg?style=flat-square)](https://codecov.io/github/imcuttle/click-popup?branch=master)--\u003e\n\n[![Build status](https://img.shields.io/travis/imcuttle/click-popup/master.svg?style=flat-square)](https://travis-ci.org/imcuttle/click-popup)\n[![NPM version](https://img.shields.io/npm/v/click-popup.svg?style=flat-square)](https://www.npmjs.com/package/click-popup)\n[![NPM Downloads](https://img.shields.io/npm/dm/click-popup.svg?style=flat-square\u0026maxAge=43200)](https://www.npmjs.com/package/click-popup)\n[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://prettier.io/)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)\n\nThe interaction about funny popup animation\n\n![](./screenshot.gif)\n\n- [Live Demo](https://imcuttle.github.io/click-popup)\n\n## Installation\n\n```bash\nnpm install click-popup\n# or use yarn\nyarn add click-popup\n```\n\n## Usage\n\n```javascript\nimport clickPopup from 'click-popup'\n\nconst span = document.createElement('span')\nspan.textContent = '民主'\nconst dispose = clickPopup(\n  ['富强', span, '文明', '和谐', '自由', '平等', '公正', '法治', '爱国', '敬业', '诚信', '友善'],\n  document.body,\n  {\n    index: 0,\n    styleMapper: style =\u003e ({ ...style, color: 'rgb(255,102,81)', fontSize: 12, fontWeight: 'bold' })\n  }\n)\n\n// Call `dispose()` for removing\n```\n\n## API\n\n### `clickPopup(nodeList: Array\u003cNode|string\u003e, Node, options?)`\n\n#### options\n\n- `index`: start index (Type: `number`, Default: `0`)\n- `styleMapper`: style mapper (Type: `(style, currentNode) =\u003e style`, Default: `sty =\u003e sty`)\n- The rest of options see [popmotion - tween](https://popmotion.io/api/tween/#tween-props)\n\n## Related\n\n- [popmotion](https://github.com/Popmotion/popmotion) - Simple animation libraries for delightful user interfaces\n\n## Authors\n\nThis library is written and maintained by imcuttle, \u003ca href=\"mailto:moyuyc95@gmail.com\"\u003emoyuyc95@gmail.com\u003c/a\u003e.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcuttle%2Fclick-popup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimcuttle%2Fclick-popup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcuttle%2Fclick-popup/lists"}