SweetUI

Search items

Jump to an item

recipe

popover

`.popover` guidance.

popoverhover-cardtooltipanchoredguidance
popover, light

On iPad

The same installed source at a regular width. It adapts its layout without a separate design.

popover on iPad, light

Install

Usage

@State private var isShowingHelp = false

Button("Why is this needed?") { isShowingHelp = true }
    .buttonStyle(.registryLink)
    .popover(isPresented: $isShowingHelp) {
        Text("We use your date of birth to verify your identity.")
            .padding()
            .presentationCompactAdaptation(.popover)
    }
    .registryItem("popover")

Why native is enough

.popover anchors content; iPhone: sheet unless .presentationCompactAdaptation(.popover). System: arrow, no dim, outside-tap dismiss. No wrapper.

Accessibility contract

  • Popover: VoiceOver-reachable, escape-dismissed.
  • Info MUST NOT live only in popover; label MUST stand alone.

Details

Kindrecipe
Version0.1.1
PlatformsiOS 26.0+
Dependenciesbutton
Sourcenone (native guidance)