
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
dlink-tooltip
Advanced tools
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.1.6 - 19.2.14.
This library was generated with Angular CLI version 15.1.6 - 19.2.14.
dlink-tooltip
is a lightweight, highly customizable Angular tooltip library designed to enhance UX without relying on heavy CSS hacks. Ideal for enterprise-level applications where UI clarity and control matter.
Hide when filed out-of canvas Always visible Tooltip auto hide when the tooltip goes out of the browser's viewable area.
Full Implementation of html Elemnets Now you can show full HTML just like any other HTML elements example Table, grid, etc... (form supports might be avalible for publicly in future Realease)
Live Tooltip Updates Tooltip content now updates in real-time, ensuring the latest data is always displayed.
Responsive Tooltip Positioning Tooltips now dynamically adjust their position during screen zoom or scroll events for improved visibility and user experience.
Experience the new tooltip features in action: ๐ View D-Link Tooltip Live Demo
dlink-tooltip
?Hardcoded CSS tooltips are:
dLink offers:
npm install dlink-tooltip
โ ๏ธ We recommend using a dLink LTS version to avoid dependency conflicts or bugs and ensure smoother integration.
import { DLinkModule } from 'dlink-tooltip';
@NgModule({
imports: [ DLinkModule ]
})
export class YourModule { }
dLink Version | Angular Version |
---|---|
0.0.1 - 1.0.3 | 15.1.6 |
16.0.0 | 16.2.12 |
17.0.0 | 17.3.12 |
18.0.0 | 18.2.13 |
Latest | 19.2.14 |
<!-- Simple tooltip -->
<button dLinkTooltip="This is a tooltip">Hover me</button>
<button
dLinkTooltip="<strong>Rich HTML</strong> content"
[tooltipHtml]="true"
tooltipTheme="light"
tooltipAnimation="scale"
tooltipTrigger="click"
[tooltipPosition]="'top-right'"
[tooltipFontSize]="'14px'"
[tooltipGap]="8"
[tooltipAlign]="'left'"
[tooltipMaxWidth]="'200px'"
[tooltipClass]="'custom-tooltip'"
[tooltipSmartPosition]="true"
[tooltipSpeed]="'fast'"
[tooltipShowDelay]="200"
[tooltipHideDelay]="100"
[tooltipAutoHide]="3000"
[tooltipPersistent]="false"
[tooltipShowOnLoad]="false"
[tooltipOffset]="{x: 10, y: 5}"
[tooltipTouchGestures]="true"
tooltipAriaLabel="Additional info"
(tooltipShow)="onShow()" //Info: In future updates
(tooltipHide)="onHide()" //Info: In future updates
>
Advanced Tooltip
</button>
Input | Type | Default | Description |
---|---|---|---|
dLinkTooltip | string | '' | The text/content shown in the tooltip |
tooltipPosition | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top' | Tooltip placement |
tooltipTrigger | 'hover' | 'click' | 'focus' | 'hover' | How tooltip is triggered |
tooltipTheme | 'dark' | 'light' | 'custom' | 'dark' | Built-in theme or custom styling |
tooltipAnimation | 'fade' | 'slide' | 'scale' | 'none' | 'fade' | Animation type for show/hide |
tooltipSpeed | 'fast' | 'medium' | 'slow' | 'medium' | Animation speed |
Input | Type | Default | Description |
---|---|---|---|
tooltipHtml | boolean | false | Enable HTML content rendering |
tooltipFontSize | string | '14px' | Font size of tooltip content |
tooltipMaxWidth | string | '200px' | Max width of the tooltip |
tooltipAlign | 'center' | 'left' | 'right' | 'center' | Tooltip alignment relative to element |
tooltipClass | string | '' | Custom CSS class for additional styling |
Input | Type | Default | Description |
---|---|---|---|
tooltipGap | number | 8 | Distance between tooltip and element |
tooltipOffset | {x: number, y: number} | {x:0, y:0} | Additional X/Y offset for fine positioning |
tooltipSmartPosition | boolean | true | Auto-adjust if tooltip goes out of viewport |
Input | Type | Default | Description |
---|---|---|---|
tooltipShowDelay | number | 0 | Delay before showing tooltip (ms) |
tooltipHideDelay | number | 0 | Delay before hiding tooltip (ms) |
tooltipAutoHide | number | 0 | Auto-hide after milliseconds (0 = disabled) |
tooltipPersistent | boolean | false | Keeps tooltip visible until manually hidden |
tooltipShowOnLoad | boolean | false | Shows tooltip as soon as component loads |
Input | Type | Default | Description |
---|---|---|---|
tooltipTouchGestures | boolean | true | Enable touch gesture support |
tooltipRole | string | 'tooltip' | ARIA role attribute |
tooltipAriaLabel | string | '' | ARIA label for accessibility |
Event | Type | Description |
---|---|---|
tooltipShow | EventEmitter<void> | Emitted when tooltip is shown |
tooltipHide | EventEmitter<void> | Emitted when tooltip is hidden |
Method | Description |
---|---|
showTooltip() | Programmatically show the tooltip |
hideTooltip() | Programmatically hide the tooltip |
toggleTooltip() | Toggle tooltip visibility |
<!-- Hover trigger (default) -->
<button dLinkTooltip="Hover tooltip" tooltipTrigger="hover">Hover me</button>
<!-- Click trigger -->
<button dLinkTooltip="Click tooltip" tooltipTrigger="click">Click me</button>
<!-- Focus trigger -->
<input dLinkTooltip="Focus tooltip" tooltipTrigger="focus" placeholder="Focus me">
<!-- Dark theme (default) -->
<button dLinkTooltip="Dark theme tooltip" tooltipTheme="dark">Dark</button>
<!-- Light theme -->
<button dLinkTooltip="Light theme tooltip" tooltipTheme="light">Light</button>
<!-- Custom theme -->
<button dLinkTooltip="Custom theme tooltip" tooltipTheme="custom" tooltipClass="my-custom-tooltip">Custom</button>
<!-- Fade animation (default) -->
<button dLinkTooltip="Fade animation" tooltipAnimation="fade">Fade</button>
<!-- Slide animation -->
<button dLinkTooltip="Slide animation" tooltipAnimation="slide">Slide</button>
<!-- Scale animation -->
<button dLinkTooltip="Scale animation" tooltipAnimation="scale">Scale</button>
<!-- No animation -->
<button dLinkTooltip="No animation" tooltipAnimation="none">None</button>
<!-- Plain text -->
<button dLinkTooltip="Plain text tooltip">Plain Text</button>
<!-- HTML content -->
<button dLinkTooltip="<strong>Bold</strong> and <em>italic</em> text" [tooltipHtml]="true">HTML Content</button>
<!-- Rich HTML -->
<button dLinkTooltip="<div style='color: #ff6b6b;'>๐จ Styled HTML</div><br><small>With line breaks</small>"
[tooltipHtml]="true">Rich HTML</button>
export class MyComponent {
onTooltipShow() {
console.log('Tooltip shown!');
}
onTooltipHide() {
console.log('Tooltip hidden!');
}
}
<!-- Info: In future updates currently not available -->
<button dLinkTooltip="Event tooltip"
(tooltipShow)="onTooltipShow()"
(tooltipHide)="onTooltipHide()">
Events Tooltip
</button>
<!-- Persistent tooltip -->
<div dLinkTooltip="This tooltip stays visible!"
[tooltipPersistent]="true"
[tooltipShowOnLoad]="true"
tooltipPosition="right">
Persistent tooltip
</div>
<!-- Auto-hide tooltip -->
<button dLinkTooltip="Auto-hide after 3 seconds"
[tooltipAutoHide]="3000">
Auto Hide
</button>
<!-- All position options -->
<button dLinkTooltip="Top tooltip" tooltipPosition="top">Top</button>
<button dLinkTooltip="Top-left tooltip" tooltipPosition="top-left">Top-Left</button>
<button dLinkTooltip="Top-right tooltip" tooltipPosition="top-right">Top-Right</button>
<button dLinkTooltip="Bottom tooltip" tooltipPosition="bottom">Bottom</button>
<button dLinkTooltip="Bottom-left tooltip" tooltipPosition="bottom-left">Bottom-Left</button>
<button dLinkTooltip="Bottom-right tooltip" tooltipPosition="bottom-right">Bottom-Right</button>
<button dLinkTooltip="Left tooltip" tooltipPosition="left">Left</button>
<button dLinkTooltip="Right tooltip" tooltipPosition="right">Right</button>
<!-- With offset -->
<button dLinkTooltip="Offset tooltip" [tooltipOffset]="{x: 20, y: 10}">Offset</button>
<button dLinkTooltip="Accessible tooltip"
tooltipAriaLabel="Additional accessibility information"
tooltipRole="tooltip">
Accessible Tooltip
</button>
<button
dLinkTooltip="<div style='text-align: center;'><strong>๐ Advanced Tooltip</strong><br><em>Multiple features combined</em><br><small style='color: #888;'>HTML + Theme + Animation</small></div>"
[tooltipHtml]="true"
tooltipTheme="light"
tooltipAnimation="scale"
tooltipSpeed="slow"
tooltipPosition="top"
[tooltipShowDelay]="300"
[tooltipHideDelay]="200"
tooltipMaxWidth="250px"
[tooltipOffset]="{x: 0, y: -5}">
๐ฏ Complex Tooltip
</button>
// Custom theme CSS
.my-custom-tooltip {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
color: white !important;
border: 2px solid #fff !important;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
font-weight: 600 !important;
}
ng generate component component-name --project rx-tooltip
Always use
--project rx-tooltip
to scope to the library
ng build rx-tooltip
cd dist/rx-tooltip
npm publish
ng test rx-tooltip
FAQs
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.1.6 - 19.2.14.
The npm package dlink-tooltip receives a total of 14 weekly downloads. As such, dlink-tooltip popularity was classified as not popular.
We found that dlink-tooltip demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.