BrowseTooltip

Feedback

Tooltip

A small hint that appears on hover or focus.

Preview

Opens on hover and on keyboard focus.

Installation

Install the package once, then import the parts you use into a standalone component.

Install

npm install ngx-vitreo @angular/cdk @floating-ui/dom
Import

import { GlassTooltipProvider, GlassTooltip, GlassTooltipTrigger, GlassTooltipContent } from 'ngx-vitreo';

@Component({
  imports: [GlassTooltipProvider, GlassTooltip, GlassTooltipTrigger, GlassTooltipContent],
  // ...
})

Usage

Usage

<glass-tooltip-provider>
  <glass-tooltip>
    <button glassButton glassTooltipTrigger>Hover</button>
    <glass-tooltip-content>Tooltip content</glass-tooltip-content>
  </glass-tooltip>
</glass-tooltip-provider>

API reference

GlassTooltipProvider

glass-tooltip-provider

InputTypeDefaultDescription
delayDurationnumber700Milliseconds of hover before a tooltip opens.
skipDelayDurationnumber300After a tooltip closes, the next opens at once for this long.
disableHoverableContentbooleanfalseCloses as the pointer leaves the trigger, even toward the tooltip.

GlassTooltip

glass-tooltip

InputTypeDefaultDescription
[(open)]booleanfalseWhether the tooltip is open.
delayDurationnumber the provider's Overrides the delay for this tooltip.

GlassTooltipTrigger

[glassTooltipTrigger]

GlassTooltipContent

glass-tooltip-content

InputTypeDefaultDescription
sideOffsetnumber6Gap between the trigger and the label, in pixels.
side'top' | 'right' | 'bottom' | 'left''top'Preferred side; it flips to stay on screen.
aria-labelstring its text What a screen reader announces instead of the visible text.
classstringNoneApplies to the glass panel, which is the element itself.