RizzyUI

Tooltip

Use RzTooltip to show concise, non-interactive contextual hints for buttons, links, and icons. Wrap related tooltips in a TooltipProvider when you want shared delay settings.

TooltipProvider with nested tooltips

This example wraps a section with TooltipProvider and shows nested RzTooltip components using TooltipTrigger and TooltipContent.

Source
<TooltipProvider DelayDuration="250" SkipDelayDuration="300">
    <section class="flex flex-wrap items-center gap-4">
        <RzTooltip>
            <TooltipTrigger AsChild>
                <RzButton Variant="ThemeVariant.Primary">Save</RzButton>
            </TooltipTrigger>
            <TooltipContent>
                Save your current changes.
            </TooltipContent>
        </RzTooltip>

        <RzTooltip>
            <TooltipTrigger AsChild>
                <RzButton Variant="ThemeVariant.Secondary">Share</RzButton>
            </TooltipTrigger>
            <TooltipContent Anchor="AnchorPoint.Top">
                Invite collaborators to this document.
            </TooltipContent>
        </RzTooltip>
    </section>
</TooltipProvider>

Minimal tooltip

A direct equivalent to the common pattern <Tooltip><TooltipTrigger>...</TooltipTrigger><TooltipContent>...</TooltipContent></Tooltip>, using RizzyUI names.

Source
<RzTooltip>
    <TooltipTrigger AsChild>
        <RzButton Variant="ThemeVariant.Secondary">Hover me</RzButton>
    </TooltipTrigger>
    <TooltipContent>
        A simple tooltip.
    </TooltipContent>
</RzTooltip>

Accessibility

Tooltip follows the WAI-ARIA Authoring Practices tooltip pattern for non-modal descriptive content. The trigger references the tooltip with aria-describedby, and the floating content renders with role="tooltip" and a stable ID relationship.

Tooltip opens on pointer hover and keyboard focus using the configured delay. It closes on pointer leave, blur, or Escape. Pressing Escape closes a visible tooltip and returns focus to the trigger. Tooltip does not trap focus and the content itself is not focusable.

Keep TooltipContent short and non-interactive. Links, buttons, forms, menus, and other disclosure content belong in RzPopover, which is designed for interactive popover semantics.

Screen readers announce tooltip text through the trigger description relationship when the trigger receives focus. There is no live region because tooltip text should not interrupt the current task, and repeated hover changes should not create extra announcements. Hoverable content is preserved for pointer users when DisableHoverableContent is false, but the content must still remain non-interactive. The implementation remains SSR-safe and CSP-compatible: server-rendered markup provides the role and ID relationships, while Alpine updates visibility state without Blazor event handlers.

Component Parameters

The following tables summarize primary tooltip parameters.

RzTooltip

PropertyDescriptionTypeDefault
ChildContentShould include TooltipTrigger and TooltipContent.RenderFragmentRequired
AnchorPreferred anchor placement around trigger.AnchorPointTop
DelayDurationOpen delay in milliseconds.int700
OpenControlled open state rendered for the Alpine runtime.bool?null
DefaultOpenInitial open state when uncontrolled.boolfalse
DisableHoverableContentDisables pointer hover persistence over the floating content. Content must remain non-interactive either way.boolfalse
AriaLabelOptional label for the tooltip scope container. The trigger-to-content description uses generated IDs automatically.string?Localized

TooltipProvider

PropertyDescriptionTypeDefault
ChildContentNested tooltips receiving shared defaults.RenderFragmentRequired
DelayDurationShared delay before opening.int0
SkipDelayDurationWindow after close where reopen skips full delay.int300
DisableHoverableContentShared setting that disables pointer hover persistence over tooltip content.boolfalse

Alpine API

Tooltip positioning and interactions are implemented by Alpine x-data component rzTooltip.

MethodParametersDescription
queueOpenNoneStarts the delayed open pipeline and shows tooltip.
queueCloseNoneStarts delayed close behavior and hides tooltip.
handleWindowEscapeNoneClears pending timers, closes the tooltip, and restores focus to the trigger.
updatePositionNoneRecomputes floating position using current anchor options.