{"id":13808819,"url":"https://github.com/cloudfactorydk/ng2-tooltip-directive","last_synced_at":"2025-05-14T03:31:35.528Z","repository":{"id":41093280,"uuid":"508269297","full_name":"cloudfactorydk/ng2-tooltip-directive","owner":"cloudfactorydk","description":"The tooltip is a pop-up tip that appears when you hover over an item or click on it.","archived":false,"fork":false,"pushed_at":"2024-06-07T11:35:54.000Z","size":1303,"stargazers_count":5,"open_issues_count":5,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-02T10:03:10.647Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@cloudfactorydk/ng2-tooltip-directive","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"drozhzhin-n-e/ng2-tooltip-directive","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudfactorydk.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":"2022-06-28T11:23:18.000Z","updated_at":"2024-11-20T11:11:21.000Z","dependencies_parsed_at":"2024-06-07T12:50:40.274Z","dependency_job_id":null,"html_url":"https://github.com/cloudfactorydk/ng2-tooltip-directive","commit_stats":{"total_commits":144,"total_committers":22,"mean_commits":6.545454545454546,"dds":"0.36111111111111116","last_synced_commit":"6a6b68d352f9576b41f3d0fd14d45cdd0cca301b"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfactorydk%2Fng2-tooltip-directive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfactorydk%2Fng2-tooltip-directive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfactorydk%2Fng2-tooltip-directive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfactorydk%2Fng2-tooltip-directive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudfactorydk","download_url":"https://codeload.github.com/cloudfactorydk/ng2-tooltip-directive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253900623,"owners_count":21981274,"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-08-04T01:01:52.635Z","updated_at":"2025-05-14T03:31:34.988Z","avatar_url":"https://github.com/cloudfactorydk.png","language":"TypeScript","readme":"# Tooltip for Angular\n### forked from drozhzhin-n-e/ng2-tooltip-directive\n\nThe tooltip is a pop-up tip that appears when you hover over an item or click on it.\n\n## Installation\n\nInstall the npm package.\n\n    npm i @cloudfactorydk/ng2-tooltip-directive\n        \nImport `Ng2Module`:\n\n```ts\nimport { TooltipModule } from '@cloudfactorydk/ng2-tooltip-directive';\n \n@NgModule({\n    imports: [ TooltipModule ]\n}) \n```\n\n## Usage\n    \nOptions can be set in the directive tag, so they have the highest priority.\n\n```html\n\u003cspan tooltip=\"Tooltip\" placement=\"top\" showDelay=\"500\"\u003eTooltip on top\u003c/span\u003e\n```\n\nYou may pass as an object:\n\n```html\n\u003cspan tooltip=\"Tooltip\" [options]=\"myOptions\"\u003eTooltip on left\u003c/span\u003e\n```\n```ts\nmyOptions = {\n    'placement': 'left',\n    'showDelay': 500\n}\n```\n\nYou can pass HTML as content :\n\n```html\n\u003cspan tooltip=\"\u003cp\u003eHello i'm a \u003cstrong\u003ebold\u003c/strong\u003e text!\u003c/p\u003e\"\u003e\n  Tooltip with HTML content\n\u003c/span\u003e\n```\n\n```html\n\u003cng-template #HtmlContent\u003e\n  \u003cp\u003eHello i'm a \u003cstrong\u003ebold\u003c/strong\u003e text!\u003c/p\u003e\n\u003c/ng-template\u003e\n\n\u003cspan [tooltip]=\"HtmlContent\" contentType=\"template\"\u003e\n  Tooltip with template content\n\u003c/span\u003e\n```\n\n## Set default values\n\nCreate a file with your settings, for example:\n```ts\nimport { TooltipOptions } from '@cloudfactorydk/ng2-tooltip-directive';\n\nexport const MyDefaultTooltipOptions: TooltipOptions = {\n  'show-delay': 500\n}\n```\n    \nAnd pass your parameters when importing the module:\n```ts\nimport { TooltipModule, TooltipOptions } from '@cloudfactorydk/ng2-tooltip-directive';\nimport { MyDefaultTooltipOptions } from './my-default-options';\n \n@NgModule({\n    imports: [ \n      TooltipModule.forRoot(MyDefaultTooltipOptions as TooltipOptions)\n    ]\n})\n```\n\n## Properties\n\n| name             | type                                | default | description                                 |\n|------------------|-------------------------------------|---------|---------------------------------------------|\n| placement        | \"top\", \"bottom\", \"left\", \"right\"    | \"top\"   | The position of the tooltip.                |\n| autoPlacement    | boolean                             | true    | Place the tooltip so that it does not go beyond the borders of the browser window. |\n| showDelay       | number                              | 0       | The delay in ms before showing the tooltip. |\n| hideDelay       | number                              | 300     | The delay in ms before removing the tooltip. |\n| hideDelayTouchscreen | number                          | 0       | Delay in milliseconds before hiding the tooltip (for mobile devices). |\n| display          | boolean                             | true    | Tooltip availability for display.           |\n| displayTouchscreen | boolean                           | true    | Display the tooltip on mobile devices.      |\n| zIndex          | number                              | 0       | Z-index of the tooltip.                     |\n| trigger          | \"hover\", \"click\"                    | \"hover\" | Specifies how the tooltip is triggered. Control the closing time with \"hide-delay\". |\n| tooltipClass    | string                              |         | Classes to be passed to the tooltip.        |\n| animationDuration | number                            | 300     | The duration controls how long the animation takes to run from start to finish. |\n| theme            | \"dark\", \"light\"                     | \"dark\"  | Theme of tooltip background and text.       |\n| shadow           | boolean                             | true    | Shadow of the tooltip.                      |\n| offset           | number                              | 8       | Offset the tooltip relative to the item.    |\n| width            | number                              | undefined | Width of the tooltip.                     |\n| maxWidth        | number                              | 200     | Maximum width of the tooltip.               |\n| contentType     | \"string\", \"html', \"template\"        | \"string\" | The content type passed to the tooltip.    |\n| hideDelayAfterClick | number                           | 2000    | Tooltip hiding delay for \"click\" trigger.   |\n| pointerEvents    | \"auto\", \"none\"                      | \"none\"  | Defines whether or not an element reacts to pointer events. |\n| position         | {top: number, left: number}         | undefined | The tooltip coordinates relative to the browser window. |\n\n## Events\n\nWhen you call events, the delays that are specified in the options in the directive are taken into account. Default delay before tooltip hiding is 300 milliseconds.\n\n| Event            | Description                                                                                 |\n|------------------|---------------------------------------------------------------------------------------------|\n| {type: \"show\", position: DOMRect} | The event is called before the tooltip appears. |\n| {type: \"shown\", position: DOMRect} | The event is called after the animation of the appearance of the tooltip. |\n| {type: \"hide\", position: DOMRect} | The event is called before the tooltip is hidden. |\n| {type: \"hidden\", position: DOMRect} | The event is called after the animation of the tooltip is hidden. |\n\n## Methods\n\nIf you specified the directive options, they will be taken into account when calling methods. Including the delay before the appearance and hiding of the tooltip.\n\n| Method           | Description                                                                                 |\n|------------------|---------------------------------------------------------------------------------------------|\n| show()           | Shows the tooltip                                                                           |\n| hide()           | Hides the tooltip                                                                           |\n","funding_links":[],"categories":["Table of contents"],"sub_categories":["Third Party Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfactorydk%2Fng2-tooltip-directive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudfactorydk%2Fng2-tooltip-directive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfactorydk%2Fng2-tooltip-directive/lists"}