Tooltip

Contextual information that appears on hover or focus. Non-interactive — for supplementary descriptions only.

Primitive: TooltipARIA: role="tooltip"Keyboard: Escape dismisses
Hover me
This is a tooltip
Focus me
Tooltip below
tooltip.rs
use stratum_leptos::*;

view! {
    <Tooltip content="This is a tooltip">
        <Button variant=ButtonVariant::Outline>
            "Hover me"
        </Button>
    </Tooltip>
}

Installation

stratum add tooltip

Props

PropTypeDefaultDescription
openOption<bool>NoneControlled open state
default_openboolfalseInitial open state
delay_msu32700Delay before showing (ms)
sideTooltipSideTopPlacement: Top, Right, Bottom, Left
on_open_changeOption<Callback<bool>>NoneFires when visibility changes

Accessibility

  • Content renders with role="tooltip".
  • Trigger gets aria-describedby pointing to the tooltip content.
  • Opens on hover (PointerEnter) and focus. Closes on blur and Escape.
  • Tooltip content is non-interactive — use Popover for interactive overlays.

Source

Primitive: tooltip.rs
Styled: tooltip.rs