overlays/DSPopover
DSPopover
overlaysAnchored floating panel with an arrow pointing to its trigger. Contains rich content — not just text.
iOS 17+macOS 14+
Purpose
Action menus, rich tooltips, user profile previews, and mini-forms.
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 |
|---|---|---|---|
| isPresentedreq | Binding<Bool> | — | Controls visibility. |
| arrowEdge | Edge | .top | Which edge of the anchor the arrow points from. |
| contentreq | ViewBuilder | — | Popover content. |
| anchor (ViewBuilder)req | ViewBuilder | — | The trigger view. |
Examples
User hovercard
Profile popover on avatar tap.
swift
DSPopover(isPresented: $showProfile, arrowEdge: .bottom) {
UserMiniCard(user: post.author)
} anchor: {
DSAvatar(initials: post.author.initials, size: .sm)
.onTapGesture { showProfile.toggle() }
}