Skip to content

zk-tooltip ​

A short text that describes an element.

Props ​

PropTypeDefaultDescription
idstringrequiredIdentifier of the tooltip
textstring|nullnullText
placementstring'top'top, bottom, left or right: data-placement
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Slots ​

SlotDescription
defaultThe element described (a button, a link)

Put aria-describedby with the same id on the element. Showing it is yours, with CSS: .tooltip-wrapper:hover .tooltip, .tooltip-wrapper:focus-within .tooltip { ... } (it has role="tooltip"). Class hooks: tooltip-wrapper, tooltip.

Examples ​

Basic ​

blade
<x-zk-tooltip id="copy-tip" text="Copy the link">
    <button aria-describedby="copy-tip">Copy</button>
</x-zk-tooltip>

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.