Feedback/DSTooltip

DSTooltip

feedback
since v2.0

Small informational popover that appears on long-press (iOS) or hover (macOS). Disappears automatically after a timeout.

iOS 17+macOS 14+

Purpose

Explain icon buttons, abbreviations, and non-obvious UI elements without cluttering the layout.

Props

PropTypeDefaultDescription
contentreqStringTooltip text.
positionDSTooltipPosition.top.top, .bottom, .leading, .trailing.
content (ViewBuilder)reqViewBuilderThe view to attach the tooltip to.

Examples

Icon button tooltip

Tooltip on an icon-only button.

swift
DSTooltip("Share with team") {
    DSIconButton(icon: "square.and.arrow.up", action: share)
}

Related Components