Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
ActionsApple

Tooltip

Show native contextual help around an independently accessible anchor.

Public APILumenTooltipApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+

Native example

Use Tooltip

Use brief supplemental help. Essential instructions belong in visible content. Pass LumenTooltipState for explicit Compose show/dismiss controls; React Native uses visible/onVisibleChange and SwiftUI uses isPresented binding. Disabling dismisses help without removing the anchor.

Tooltip rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulator
swift
LumenTooltip("Project help", text: "Save this project", isPresented: $visible)

Reference

Public API

The primary shared and platform-specific options exposed by LumenTooltip.

APIValues or typeDefaultDescription
textStringRequiredProvides non-empty translated contextual help.
modifierModifierModifierApplies anchor-container layout.
stateLumenTooltipStaterememberLumenTooltipState()Supports application-controlled visibility with Lumen state backed by Material.
enabledBooleantrueEnables help and dismisses it when disabled.
content@Composable () -> UnitRequiredProvides an independently labeled native anchor.

Native behavior

Design and accessibility

When to use it

Use brief supplemental help. Essential instructions belong in visible content. Pass LumenTooltipState for explicit Compose show/dismiss controls; React Native uses visible/onVisibleChange and SwiftUI uses isPresented binding. Disabling dismisses help without removing the anchor.

Accessibility

Keeps the anchor independently named and delegates long-press, pointer, and popup dismissal to Material.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package