{"id":21818657,"url":"https://github.com/itisnajim/ngx-bubble","last_synced_at":"2026-05-10T10:02:42.306Z","repository":{"id":65458804,"uuid":"350842412","full_name":"itisnajim/ngx-bubble","owner":"itisnajim","description":"An angular bubble component inspired from facebook chat heads, with the help of interactjs.","archived":false,"fork":false,"pushed_at":"2021-03-25T19:05:32.000Z","size":2184,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T23:51:31.917Z","etag":null,"topics":["angular","bubble","button","chat-head","component","draggable","fab","interactjs","ionic","mobile","ngx-bubble","pwa","web"],"latest_commit_sha":null,"homepage":"","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/itisnajim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["itisnajim"],"patreon":"itisnajim","ko_fi":"itisnajim","issuehunt":"itisnajim"}},"created_at":"2021-03-23T20:04:53.000Z","updated_at":"2023-08-25T19:31:17.000Z","dependencies_parsed_at":"2023-01-24T14:45:34.722Z","dependency_job_id":null,"html_url":"https://github.com/itisnajim/ngx-bubble","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/itisnajim%2Fngx-bubble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itisnajim%2Fngx-bubble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itisnajim%2Fngx-bubble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itisnajim%2Fngx-bubble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itisnajim","download_url":"https://codeload.github.com/itisnajim/ngx-bubble/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244777135,"owners_count":20508647,"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":["angular","bubble","button","chat-head","component","draggable","fab","interactjs","ionic","mobile","ngx-bubble","pwa","web"],"created_at":"2024-11-27T16:14:21.916Z","updated_at":"2026-05-10T10:02:37.247Z","avatar_url":"https://github.com/itisnajim.png","language":"TypeScript","funding_links":["https://github.com/sponsors/itisnajim","https://patreon.com/itisnajim","https://ko-fi.com/itisnajim","https://issuehunt.io/r/itisnajim"],"categories":[],"sub_categories":[],"readme":"[![npm version](https://img.shields.io/npm/v/ngx-bubble.svg)](https://www.npmjs.com/package/ngx-bubble) [![downloads](https://img.shields.io/npm/dm/ngx-bubble.svg)](https://www.npmjs.com/package/ngx-bubble)\n\n# ngx-bubble\n\nAn angular bubble component inspired from facebook chat heads, with the help of [interactjs](https://www.npmjs.com/package/interactjs).\n\n## Preview\n\n![preview](https://github.com/itisnajim/ngx-bubble/blob/main/preview.gif)  \n\n## Installation\n```\nnpm i -S ngx-bubble\n```\n\n## Usage Example\n### Import the module first\n```typescript\nimport { NgxBubbleModule } from 'ngx-bubble';\n@NgModule({\n    ...\n    imports: [\n        NgxBubbleModule,\n        ...\n    ],\n    ...\n```\n\n```html\n\u003cdiv class=\"container\" style=\"position: relative; width: 100vw; height: 260px;\"\u003e\n    \u003cngx-bubble \n    x=\"20\" y=\"20\"\n    *ngIf=\"!hidden\"\u003e\n        \u003cbutton style=\"width: 4rem; height: 4rem; border-radius: 100%;\" (click)=\"hidden=true\"\u003eHide\u003c/button\u003e\n    \u003c/ngx-bubble\u003e\n\u003c/div\u003e\n```\n\n## Inputs and Outputs\n```typescript \n// Initial position x relative to the parent(container), default = 0\nx: number;\n\n// Initial position y relative to the parent(container), default = 0\ny: number;\n\n// see https://interactjs.io/docs/action-options\ndragOptions: Object;\n\n// Callback/Event fired when the bubble draging start.\nbubbleMoveStart: ({x: number, y: number}) =\u003e void; \n\n// Callback/Event fired whenever the bubble is on dragging and moving.\nbubbleMoving : ({x: number, y: number}) =\u003e void;\n\n// Callback/Event fired when the bubble draging end.\nbubbleMoveEnd : ({x: number, y: number}) =\u003e void;\n```\n### Full usage !\n```html\n\u003cbutton (click)=\"hidden=false\"\u003eShow the bubble\u003c/button\u003e\n\u003cdiv class=\"container\" style=\"position: relative; width: 100vw; height: 260px;\"\u003e\n    \u003cngx-bubble \n    x=\"20\" y=\"20\"\n    dragOptions=\"{{dragOptions}}\"\n    (bubbleMoveStart)=\"bubbleMoveStart($event)\"\n    (bubbleMoving)=\"bubbleMoving($event)\"\n    (bubbleMoveEnd)=\"bubbleMoveEnd($event)\"\n    *ngIf=\"!hidden\"\u003e\n        \u003cbutton style=\"width: 4rem; height: 4rem; border-radius: 100%;\" (click)=\"hidden=true\"\u003eHide\u003c/button\u003e\n    \u003c/ngx-bubble\u003e\n\u003c/div\u003e\n```\n```typescript\nhidden = false;\n\ndragOptions = {\n    speed: 300 // milliseconds\n}\n\nbubbleMoveStart(position: {x: number, y: number}): void{\n    console.log('the bubble start move from (' + String(position.x) + ',' + String(position.y) + ')');\n}\n\nbubbleMoving(position: {x: number, y: number}): void{\n    console.log('the bubble position is (' + String(position.x) + ',' + String(position.y) + ')');\n}\n\nbubbleMoveEnd(position: {x: number, y: number}): void{\n    console.log('the bubble moved to (' + String(position.x) + ',' + String(position.y) + ')');\n}\n```\n\n#### Prevent Window from scrolling/moving/reloading while dragging ngx-bubble on mobile devices.\n```typescript\nthis.isBubbleDragging = false;\nwindow.addEventListener('touchmove', (e) =\u003e this.touchBehavior(e), {passive: false});\n\nbubbleMoveStart(_: {x: number, y: number}): void{\n    this.isBubbleDragging = true;\n}\n\nbubbleMoveEnd(_: {x: number, y: number}): void{\n    this.isBubbleDragging = false;\n}\n\ntouchBehavior(e: Event){\n    if (this.isBubbleDragging) { e.preventDefault(); }\n}\n```\n\n\n## Author\n\nitisnajim, itisnajim@gmail.com\n\n## License\n\nngx-bubble is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitisnajim%2Fngx-bubble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitisnajim%2Fngx-bubble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitisnajim%2Fngx-bubble/lists"}