Skip to content

Tooltip ​

Placements

Loading...

flint-tooltip A component that displays a text label when users hover over or focus on an element.

  • Tag: <flint-tooltip>
  • Class: FlintTooltip

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintTooltip } from '@getufy/flint-ui';

Usage ​

html
<flint-tooltip></flint-tooltip>

Properties ​

PropertyAttributeTypeDefaultDescription
labellabelstring''Text content displayed inside the tooltip.
placementplacementPlacement'top'Preferred placement of the tooltip relative to the trigger element.
arrowarrowbooleanfalseShow a small arrow pointing toward the trigger element.
disableddisabledbooleanfalseDisables the tooltip so it never appears.
openDelayopen-delaynumber0Delay in ms before showing the tooltip.
closeDelayclose-delaynumber0Delay in ms before hiding the tooltip.
distancedistancenumber8Distance in pixels between the tooltip and the trigger element.
hoisthoistbooleanfalseWhen true, the tooltip popup uses position: fixed instead of position: absolute

Events ​

EventDetailDescription
flint-tooltip-show—Dispatched when the tooltip becomes visible.
flint-tooltip-hide—Dispatched when the tooltip is dismissed.

CSS Parts ​

NameDescription
baseThe component's base wrapper element.
bodyThe body element.

CSS Custom Properties ​

PropertyDefault
--flint-tooltip-bg—
--flint-tooltip-color—
--flint-tooltip-max-width300px
--flint-border-radius-sm—
--flint-font-family—
--flint-shadow-sm—