ToolTip provides extra explanation of "what this element does" or "what the user should do": it appears when the pointer hovers over the target element, or when the target element receives keyboard focus (WinUI official description: A ToolTip shows more information about a UI element… The ToolTip is shown when a user hovers over or presses and holds the UI element.).
The styling, geometry and motion align with the WinUI 3 / Windows App SDK ToolTip (microsoft-ui-xaml winui3/release/2.5.1; ToolTip_themeresources.xaml byte-for-byte identical to the WindowsAppSDK 2.0.1 used by the latest WinUI3 Gallery release v2.9.3):
9,6,9,8 (ToolTipBorderPadding), max width 320 (ToolTipMaxWidth), corner radius 4 (ControlCornerRadius), 1px border (ToolTipBorderThemeThickness).AcrylicInAppFillColorDefaultBrush (in-app Acrylic), foreground TextFillColorPrimary, border SurfaceStrokeColorFlyout.ToolTipContentThemeFontSize), line height 16, TextWrapping=Wrap.ContentPresenter, with no Pointer / arrowhead, so this component does not render an arrow either.Wrap any element; content corresponds to the WinUI ToolTipService.ToolTip="text" usage.
placement corresponds to WinUI's ToolTip.Placement, defaulting to top (i.e. the DefaultPlacementMode of an automatic WinUI ToolTip). When there is insufficient space, the component automatically flips to the opposite placement and pushes the tip back into the viewport (aligned with the "preferred placement → opposite side → edge-snapped push-back" in ToolTipPositioning::QueryRelativePosition).
WinUI delegates the delay to the process-level ToolTipService: first show = SPI_GETMOUSEHOVERTIME(400ms) × 2 (mouse / keyboard) or × 1 (touch); when less than BETWEEN_SHOW_DELAY_MS(200ms) has elapsed since the last opening, it takes the "re-show" path instead (mouse 1.5×, touch 0). FluereTooltipProvider is this service layer: wrap a group of ToolTips and they share the same re-show window.
You can also use it standalone without wrapping
FluereTooltipProvider: the component carries its own default Provider (400 / 200), though you lose the "multiple ToolTips share a re-show window" feel.
content takes plain text; use the #content slot for rich content (icons, shortcuts, multi-paragraph text). disabled corresponds to WinUI's ToolTip.IsEnabled = false (WinUI sets the Popup's Opacity to 0 in that branch; this library expresses it as not expanding).
v-model:open corresponds to ToolTip.IsOpen; combined with delay-duration it can implement guides like "explain elsewhere after clicking a button".
<FluereTooltip v-model:open="open" content="Controlled tooltip">
<FluereButton @click="open = !open">Toggle</FluereButton>
</FluereTooltip>
| Props | Type | Default | Description |
|---|---|---|---|
content | string | — | Tooltip text; aligned with the ToolTipService.ToolTip="text" usage |
open | boolean | undefined | Controlled open state (v-model:open); aligned with ToolTip.IsOpen |
placement | 'top' | 'bottom' | 'left' | 'right' | 'top' | Placement; aligned with ToolTip.Placement (default is DefaultPlacementMode) |
sideOffset | number | 4 | Gap along the placement direction (px); aligned with HorizontalOffset / VerticalOffset |
align | 'start' | 'center' | 'end' | 'center' | Alignment perpendicular to the placement direction (WinUI side is always centered + edge-snapped push-back) |
delayDuration | number | — | First-show delay (ms); defaults to inheriting the Provider (400 without a Provider) |
disabled | boolean | false | Do not expand; aligned with ToolTip.IsEnabled = false |
label | string | — | Accessible name of the tip surface; defaults to the content text |
| Events (Emits) | Payload | Description |
|---|---|---|
update:open | boolean | Update for v-model:open; aligned with IsOpen being overwritten |
| Slots | Description |
|---|---|
default | Trigger element (any focusable element; reka clones it and adds aria-describedby) |
content | Tooltip content; corresponds to WinUI's ToolTip.Content / ContentTemplate (used for rich content) |
FluereTooltipProvider| Props | Type | Default | Description |
|---|---|---|---|
delayDuration | number | 400 | First-show delay; aligned with ToolTipService.InitialShowDelay's default (400ms × 2) |
skipDelayDuration | number | 200 | Re-show window; aligned with ToolTipService.BetweenShowDelay (BETWEEN_SHOW_DELAY_MS) |
Accessibility: the trigger element gets
aria-describedbyattached automatically by reka, pointing to a hiddenrole="tooltip"element inside the tip surface — consistent with how WinUI associates the ToolTip with the target element (screen readers announce the supplementary description on focus). The tip surface itself ispointer-events: none(aligned withToolTip.IsHitTestVisible = false) and contains no focusable elements (aligned withIsTabStop = false), so it does not steal the tab order.Implementation notes
- The background is a B-tier approximation of Acrylic:
AcrylicInAppFillColorDefaultBrushis anAcrylicBrush(LightTintColor #FCFCFC/TintOpacity 0/FallbackColor #F9F9F9/TintLuminosityOpacity 0.85; Dark#2C2C2C/0.15/#2C2C2C/0.96). Fluent 2 Web's token table has no "in-app Acrylic" tier, so this library maps it tocolorNeutralCardBackground(#fafafa/#333333): Dark's TintColor matches its Dark value, and Light's FallbackColor#F9F9F9differs from#fafafaby only 1 gray step (the reference image measures the tip surface as#F9F9F9). If you need strict alignment with the real control, override the local variable:.my-app { --fui-tooltip-background: #f9f9f9; }- The motion value is the only B-tier value: WinUI's open / close use
FadeInThemeAnimation/FadeOutThemeAnimation(which only changeLayoutRoot.Opacity, 0↔1, linear).ThemeAnimations.cppmerely delegates toThemeGenerator::AddTimelinesForThemeAnimation(TAS_FADEIN / TAS_FADEOUT, …), and the duration constant lives in the non-publicvsanimation.h(not findable in the public source tree) ⇒ this library takes the shortest fade-in tier--durationFaster(100ms) +--curveLinearand turns it into a component local variable, overridable by consumers in one line:.fui-tooltip { --fui-tooltip-fade-duration: 167ms; }prefers-reduced-motionhas a fallback appearance: with the animation off, the tip surface is still a fully visible static form (theboth-filled final frameopacity: 1), leaving no transparent residue.- Z-order:
z-index: 1100, above ContentDialog and Combobox dropdowns at 1000, aligning with "ToolTip is always on top".- Touch long-press does not show: WinUI shows the tip on touch long-press (Touch mode 1× delay); on the Web, reka's triggers only recognize
pointerenter/pointermove(pointerType === 'touch'is explicitly skipped) andfocus, so on touch it only shows after "tap then focus", and long-press does not show (the native touch tooltip is still available). Known difference.- The 5s auto-hide of
SPI_GETMESSAGEDURATIONis not implemented: WinUI moves the ToolTip away from under the mouse and closes it after 5s; on the Web, forcibly hiding by time causes flicker when "the mouse is still over the control", so this library only does "close on leave / blur".PlacementMode.Mousemouse-following is not implemented: the default istop(the default placement of an automatic WinUI ToolTip); consumers who want pointer-following can listen topointermovethemselves and passplacement/sideOffset.- Known gaps: high-contrast themes are not implemented (under WinUI HC the foreground / border use
SystemColorWindowTextColorBrushand the background usesSystemColorWindowColor); the remaining supportingToolTipServiceproperties (ShowDuration/KeyboardAcceleratorToolTip/ the equivalent ofPlacementTarget) are not exposed in this release.