The Tooltip component displays a small floating hint when users hover or focus a target element. Unlike most Nettalco components that adapt between light and dark modes, the Tooltip usesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Nettalco/nettalco-theme/llms.txt
Use this file to discover all available pages before exploring further.
{surface.700} as its background in both color schemes — providing a consistently dark, high-contrast pill regardless of the page theme. Text is always {surface.0} (white), ensuring readability in all environments.
Usage
Design Tokens
All tokens are defined insrc/lib/theme/tooltip/index.ts.
Root
| Token | Value | Description |
|---|---|---|
root.maxWidth | 12.5rem | Maximum width before the tooltip wraps text (200 px) |
root.gutter | 0.25rem | Gap between the target element and the tooltip |
root.shadow | {overlay.popover.shadow} | Elevation shadow (shared with Popover namespace) |
root.padding | 0.5rem 0.75rem | Inner padding: compact vertical, slightly wider horizontal |
root.borderRadius | {overlay.popover.border.radius} | Corner radius (shared with Popover) |
Color Scheme
| Scheme | Token | Value | Description |
|---|---|---|---|
| Light | colorScheme.light.root.background | {surface.700} | Dark grey background in light mode |
| Light | colorScheme.light.root.color | {surface.0} | White text in light mode |
| Dark | colorScheme.dark.root.background | {surface.700} | Same dark grey background in dark mode |
| Dark | colorScheme.dark.root.color | {surface.0} | White text in dark mode |
Theme Notes
- Invariant dark appearance — Using
{surface.700}for both color schemes is a deliberate choice. Tooltip content is most legible against a dark background regardless of whether the application is in light or dark mode. This avoids the tooltip “inverting” awkwardly in dark mode. - Shadow from
{overlay.popover.shadow}— The tooltip borrows its shadow token from the popover namespace rather than defining its own. Updatingoverlay.popover.shadowglobally will change both the Popover and Tooltip shadow appearance. root.gutter: '0.25rem'— This is considerably smaller than the Popover’s10pxgutter, keeping the tooltip tight against its target to minimise mouse travel distance.- The
pTooltipdirective is applied directly to any HTML element or PrimeNG component. No wrapper element is required. - Use
tooltipPosition('top','bottom','left','right') andtooltipEvent('hover','focus','both') to control placement and trigger behaviour.