Skip to content

iOS and iPadOS

iOS installation

Install StanceUI for iOS and iPadOS with Swift Package Manager, wrap your app in StanceThemeProvider and build a first SwiftUI screen.

StanceUI is the native SwiftUI library for iOS and iPadOS. It uses the same tokens as the web and Android libraries, and the system’s own navigation, sheets, alerts, pickers and gestures.

  • iOS 17 and iPadOS 17 or later. Swift 6 language mode.
  • No third-party dependencies.
  • Version 0.1.0, in development and not yet tagged for release.

Add the package

In Xcode choose File, Add Package Dependencies, or add it to Package.swift:

swift
dependencies: [
    .package(url: "https://github.com/BindsHQ/stance.git", from: "0.1.0")
],
targets: [
    .target(name: "MyApp", dependencies: [.product(name: "StanceUI", package: "stance")])
]
ProductContents
StanceUIComponents, theme, icons, accessibility helpers and UIKit interop.
StanceTokensGenerated token constants only, with no UI framework imports.

Set up

Wrap the app once. The stored theme is read before the first frame, so the wrong theme never flashes.

swift
import StanceUI
import SwiftUI

@main
struct MyApp: App {
    var body: some Scene {
        WindowGroup {
            StanceThemeProvider {
                RootView().stanceToastHost()
            }
        }
    }
}

Build a screen

swift
struct TemplateSettings: View {
    @State private var name = "Sales team signature"
    @State private var autoApply = true
    @Environment(\.stanceTheme) private var theme

    var body: some View {
        StanceCard("Details") {
            StanceTextField("Template name", text: $name, isRequired: true)
            Toggle("Apply to new members", isOn: $autoApply).toggleStyle(.stance)
            StanceButton("Deploy", leadingIcon: .send) {}
        }
        .padding(StanceSpacing.lg)
        .background(theme.colors.bgCanvas)
    }
}

Native first

StanceUI styles system controls with tokens and does not reimplement them. Custom controls exist only where iOS has none, such as checkbox, badge, toast and signature canvas. On iOS 26, system bars and sheets keep their Liquid Glass materials.