SweetUI

Search items

Jump to an item

component

fold-companion

Companion pane across the iPhone Duo fold; sheet on every other display.

foldableiphone-duofoldtwo-panecompaniondetail-panel
fold-companion, light

Install

With the sweetui tool (brew install mangobyte-dev/tap/sweetui):

sweetui install fold-companion --destination Sources/YourFeature/Components

Installs in order: fold-companion 0.1.0. Point --destination at a folder inside the consuming target's sources.

Usage

@State private var isShowingDetails = false

NavigationStack {
    List {
        LabeledContent("Merchant", value: "Mishmash Bakery")
        LabeledContent("Amount", value: "KWD 8.750")
    }
    .navigationTitle("Transaction")
    .toolbar {
        Button("Details", systemImage: "sidebar.trailing") {
            isShowingDetails.toggle()
        }
    }
    .foldCompanion(isPresented: $isShowingDetails) {
        List {
            LabeledContent("Category", value: "Dining")
            LabeledContent("Status", value: "Cleared")
        }
    }
}

Accessibility contract

  • Companion keeps its open state across poses; only the person closes it.
  • Off the fold: system sheet, VoiceOver dismiss; on the fold: second pane in reading order.

Details

Kindcomponent
Version0.1.0
PlatformsiOS 26.0+
Dependenciesnone
SourceRegistry/sources/components/FoldCompanion.swift
Xcode previewFold Companion