// Generated by scripts/generate-showcase.mjs. Do not edit directly.
page TooltipDetail {
layout = "showcase"
state playground_id = ctx.url.searchParams.get("pg_id") ?? ""
state playground_open = (ctx.url.searchParams.get("pg_open") ?? "false") === "true"
state playground_defaultOpen = (ctx.url.searchParams.get("pg_defaultOpen") ?? "false") === "true"
state playground_title = ctx.url.searchParams.get("pg_title") ?? "Tooltip example"
state playground_description = ctx.url.searchParams.get("pg_description") ?? "A polished default tooltip for a modern application."
state playground_content = ctx.url.searchParams.get("pg_content") ?? "Hover or focus the trigger to inspect the tooltip."
state playground_trigger = ctx.url.searchParams.get("pg_trigger") ?? "hover"
state playground_placement = ctx.url.searchParams.get("pg_placement") ?? "top"
state playground_size = ctx.url.searchParams.get("pg_size") ?? "default"
state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary"
state playground_variant = ctx.url.searchParams.get("pg_variant") ?? "dark"
state playground_maxWidth = ctx.url.searchParams.get("pg_maxWidth") ?? "18rem"
state playground_offset = Number(ctx.url.searchParams.get("pg_offset") ?? "10")
state playground_showArrow = (ctx.url.searchParams.get("pg_showArrow") ?? "true") === "true"
state playground_interactive = (ctx.url.searchParams.get("pg_interactive") ?? "false") === "true"
state playground_disabled = (ctx.url.searchParams.get("pg_disabled") ?? "false") === "true"
state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1"
seo {
title = "Tooltip"
description = "Show concise accessible contextual help on hover, focus, click, or controlled open state."
}
view {
Overlays component
Tooltip
Show concise accessible contextual help on hover, focus, click, or controlled open state.
17 props2 slots3 outputsTheme readyResponsive
Interactive playground
Configure Tooltip
Change any prop and inspect the server-rendered component immediately.
Live preview
Component code
<Tooltip
title="Tooltip example"
description="A polished default tooltip for a modern application.">
<div data-slot="trigger">
<div class="showcase-slot">trigger slot</div>
</div>
</Tooltip>
Event outputInteract with the preview to inspect the typed payload.
Live examples
Designed for real product surfaces
Compare configurations and resize the browser to check responsive behavior.
Recommended
Hover and focus tooltip
Explain an unfamiliar control without interrupting the workflow.
01
Live preview
Hover, focus, or click the trigger
Component usage.wrn
<Tooltip
id="help-tooltip"
title="Helpful information"
description="A polished default tooltip for a modern application."
content="Tooltips explain controls without interrupting the user.">
<div data-slot="trigger">
<button type="button" class="showcase-action">Hover or focus</button>
</div>
</Tooltip>
Compact
Click tooltip
Use click activation for touch-first or interactive help.
02
Live preview
Hover, focus, or click the trigger
Component usage.wrn
<Tooltip
id="click-tooltip"
title="Compact Tooltip"
description="A compact configuration for dashboards and dense product surfaces."
content="Click again or press Escape to close."
trigger="click"
placement="bottom"
size="sm"
variant="soft">
<div data-slot="trigger">
<button type="button" class="showcase-action">Click for help</button>
</div>
</Tooltip>
Advanced
Interactive rich tooltip
Allow pointer interaction when the tooltip contains supporting links or controls.
03
Live preview
Hover, focus, or click the trigger
Component usage.wrn
<Tooltip
id="interactive-tooltip"
title="Keyboard shortcut"
description="Open global search from anywhere."
content="Press Ctrl or Command plus K."
trigger="both"
placement="right"
size="lg"
maxWidth="22rem"
interactive="true">
<div data-slot="trigger">
<button type="button" class="showcase-action">Show shortcut</button>
</div>
</Tooltip>
Component outputs
Receive every typed component output
Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.
@toggleFires when the component changes between open and closed or on and off states.