Feedback/dsTooltip
dsTooltip
feedbackView modifier that shows a short label next to a view while the pointer hovers it (macOS, iPadOS with a pointer, visionOS).
iOS 17+macOS 14+watchOS 10+tvOS 17+visionOS 1+
Purpose
Explain icon buttons, abbreviations and non-obvious UI elements without cluttering the layout. Hover-only: on touch-only devices it never appears, so keep the information reachable another way (e.g. an accessibilityLabel).
Interactive Reference
Live showroom
Need the full visual surface?
Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().
Best for exploring:
variants, states, categories, and real app examples in one place.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| textreq | String | โ | Tooltip text (first, unlabeled argument). |
| placement | Edge | .top | Side of the view where the tooltip appears: .top, .bottom, .leading or .trailing. |
Examples
Icon button tooltip
Tooltip on an icon-only button.
swift
DSIconButton(icon: "square.and.arrow.up", accessibilityLabel: "Share") {
share()
}
.dsTooltip("Share with team")Placement
Show the tooltip below the view.
swift
Image(systemName: "info.circle")
.dsTooltip("Prices include VAT", placement: .bottom)