Tooltip
llms.txtExample
Usage
<Tooltip text="Hello there!" withContext> {#snippet child({ props })} <Button {...props} onclick={handleClick}>Hover me</Button> {/snippet} </Tooltip>
API Reference
Tooltip
A popup that displays information related to an element when it receives keyboard focus or the mouse hovers over it. Built on top of the bits-ui Tooltip primitive.
Property Type Description
open $bindable
boolean
Whether the tooltip is open. Default:
falsetext
string
Simple text content for the tooltip. Use this for plain text tooltips. Default: —
content
Snippet
A snippet for custom tooltip content. Use this instead of text for rich content. Default: —
child
Snippet
A snippet for custom trigger rendering. The trigger element that the tooltip is anchored to. Default: —
withContext
boolean
Whether to use a context menu-style tooltip (right-click triggered). Default:
falsetriggerProps
Tooltip.TriggerProps
Additional props to pass to the underlying Tooltip.Trigger component. Default: —
contentProps
Tooltip.ContentProps
Additional props to pass to the underlying Tooltip.Content component (positioning, collision, etc.). Default: —
onOpenChange
function
A callback invoked when the open state changes. Default: —
onOpenChangeComplete
function
A callback invoked after the open/close transition completes. Default: —
disabled
boolean
Whether the tooltip is disabled. Default:
falsedelayDuration
number
The delay in milliseconds before the tooltip opens on hover. Default:
700disableHoverableContent
boolean
Whether hovering over the tooltip content keeps it open. Default:
falsedisableCloseOnTriggerClick
boolean
Whether clicking the trigger closes the tooltip. Default:
falseignoreNonKeyboardFocus
boolean
Whether to ignore non-keyboard focus events (e.g. mouse focus). Default:
falseProperty
open
text
content
child
withContext
triggerProps
contentProps
onOpenChange
onOpenChangeComplete
disabled
delayDuration
disableHoverableContent
disableCloseOnTriggerClick
ignoreNonKeyboardFocus