Components

Tooltip ​

Tooltips add lightweight supporting context to a trigger without permanently taking up layout space. They work best for short clarifications, not essential instructions.

Basic Usage ​

Pair a trigger with concise tooltip content for short explanatory copy.

Action Hints ​

Tooltips are especially useful on compact icon or utility actions where the visible label would otherwise be too noisy.

Placement ​

Choose the side that keeps the tooltip close to its trigger without covering nearby UI.

Keyboard Trigger ​

Tooltips should be available when a user reaches the trigger by keyboard focus.

API ​

Slots ​

NameDescription
triggerElement that receives the tooltip
(default)Tooltip content (falls back to content attribute)

Props ​

NameDescription
closeDelayType number
Default 0
contentType string
disabledType boolean
Default false
forAnchor element id — alternative to the trigger slot.
Type string
openDelayType number
Default 0
placementType PkPopupPlacement
Default top
triggerhover focus (default) or manual for programmatic open only.
Type 'hover focus' | 'manual'
Default hover focus

Methods ​

NameDescription
hide()Closes the tooltip programmatically.
show()Opens the tooltip programmatically.

Events ​

NameDescription
onPkOpenChange—

CSS Parts ​

NameDescriptionCSS selector
contentTooltip body::part(content)

Dependencies ​

This component registers the following elements when it loads.

NameDescription
pk-popup—
Edit this page
Last updated: Sep 9, 2026, 7:18 PM