Tooltip

A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.

This component uses newly available browser features

This component uses CSS Anchor Positioning which has only been widely supported since January 2026. If you're targeting older or less mainstream browsers then maybe this component isn't for you, yet.

Alternatively you can use Singlestage 0.4 which positions the component correctly but with limited flexibility for alignment, or roll your own using Singlestage CSS classes for consistent styling.

More Info

Side

Use the side prop to change the position of the tooltip.

With Keyboard Shortcut

Disabled Button

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;
use singlestage::*;

#[component]
pub fn TooltipAnatomy() -> impl IntoView {
    view! {
        <Tooltip>
            <TooltipTrigger />
            <TooltipContent />
        </Tooltip>
    }
}

API Reference

Tooltip

A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.

Implements global attributes.

TooltipContent

.

Custom Attributes
NameTypeDefaultDescription
alignString"center"

Set where the tooltip is rendered along the chosen side.

sideString"top"

Set which side of the triggering element that the tooltip will spawn from.

Implements global attributes.

TooltipTrigger

Contains all the parts of a Tooltip component.

Implements global attributes.