SwiftUI¶
The swiftui pack imitates SwiftUI on iOS 26, iPadOS 26 and macOS 26 — the Liquid Glass
generation: the SF Pro type stack with the Dynamic Type sizes (Large Title 34 · Title 28 · Title 2 22 ·
Title 3 20 · Headline 17 semibold · Body 17 · Callout 16 · Subheadline 15 · Footnote 13 · Caption 12 ·
Caption 2 11), the system colours (systemBlue #007AFF / #0A84FF, systemGroupedBackground
#F2F2F7 / black, label / secondaryLabel / tertiaryLabel, separators), inset-grouped lists with
rounded sections, a large-title navigation bar whose buttons sit in glass capsules, the floating glass
tab bar, 51 × 31 green switches, capsule segmented controls and sliders, the iOS alert and action
sheet, sheets with a grabber and glass context menus. Select it with import SwiftUI.
The mockup syntax is SwiftUI, so the element names are SwiftUI's own: NavigationStack,
NavigationSplitView, TabView / Tab, List, Form, Section, NavigationLink,
LabeledContent, DisclosureGroup, OutlineGroup, GroupBox, ControlGroup, Table, Menu,
Picker (.menu, .segmented, .inline, .navigationLink), Toggle, Slider, Stepper,
DatePicker, MultiDatePicker, ColorPicker, TextField, SecureField, TextEditor,
ProgressView, Gauge (.accessoryCircular, .linearCapacity, …), Chart with BarMark,
LineMark, AreaMark and SectorMark shorthands, Map, VideoPlayer, ShareLink, EditButton,
PasteButton, PhotosPicker, SignInWithAppleButton, TipView, ContentUnavailableView and
the iOS 26 additions ToolbarSpacer, .buttonStyle(.glass) and .buttonStyle(.glassProminent).
Presentations use the real modifiers: .alert, .confirmationDialog, .sheet, .popover,
.inspector, .searchable, .toolbar. Rows take iconColor: to draw the tinted icon squares of
the Settings app.
The device decides the platform: phone (the default) renders iOS, tablet renders iPadOS with a
floating sidebar and a top tab bar, desktop renders macOS with 13 pt type, compact controls and a
glass sidebar. The custom components used below (SettingsRow, SettingsToggle, TripRow,
MetricCard, MailRow) live in mockups/swiftui/components.mockitdown and are imported with
import "swiftui/components".
Sign in¶
A single-screen sign-in with rounded-border fields, a large prominent button and the Sign in with Apple button.
Source
import SwiftUI
VStack(spacing: 14) {
Spacer()
Image(systemName: "bolt.fill")
.font(.system(size: 40))
.foregroundStyle(.white)
.frame(width: 84, height: 84)
.background(.indigo)
.clipShape(.rect(cornerRadius: 20))
Text("Welcome back").font(.largeTitle).bold()
Text("Sign in to sync your notes across all your devices.")
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
VStack(spacing: 10) {
TextField("Email", text: "alex@example.com").textFieldStyle(.roundedBorder)
SecureField("Password", text: "").textFieldStyle(.roundedBorder).state(.focused)
}
.padding(.top, 12)
Button("Sign In")
.buttonStyle(.borderedProminent)
.controlSize(.large)
.frame(maxWidth: .infinity)
Text("or").font(.footnote).foregroundStyle(.secondary)
SignInWithAppleButton().frame(maxWidth: .infinity)
Spacer()
Link("Forgot password?", destination: "https://example.com/reset")
}
.padding(.horizontal, 24)
.padding(.bottom, 16)Settings¶
The iPhone Settings app: a searchable inset-grouped list, an account row, and rows with tinted
icon squares (iconColor:), values, chevrons and switches.
Source
import SwiftUI
import "swiftui/components"
NavigationStack {
List {
Section {
NavigationLink("Alex Morgan", subtitle: "Apple Account, iCloud, and more",
image: "assets/images/avatar-2.svg")
}
Section {
SettingsToggle(title: "Airplane Mode", icon: "airplane", color: .orange)
SettingsRow(title: "Wi-Fi", icon: "wifi", color: .blue, value: "Home")
SettingsRow(title: "Cellular", icon: "antenna.radiowaves.left.and.right", color: .green)
SettingsRow(title: "Personal Hotspot", icon: "personalhotspot", color: .green, value: "Off")
SettingsRow(title: "Battery", icon: "battery.100", color: .green)
}
Section {
SettingsRow(title: "General", icon: "gear", color: .gray)
SettingsRow(title: "Accessibility", icon: "accessibility", color: .blue)
SettingsRow(title: "Camera", icon: "camera.fill", color: .gray)
SettingsRow(title: "Search", icon: "magnifyingglass", color: .gray)
}
Section {
SettingsRow(title: "Notifications", icon: "bell.badge.fill", color: .red)
SettingsToggle(title: "Do Not Disturb", icon: "moon.fill", color: .indigo, isOn: true)
SettingsRow(title: "Screen Time", icon: "hourglass", color: .indigo)
}
}
.navigationTitle("Settings")
.searchable(text: "", prompt: "Search")
}List → detail¶
An inset-grouped navigation list with thumbnails and an open sort Menu, then the detail screen
it pushes: an inline title, a glass back button, a Map, a segmented Picker, LabeledContent
rows — and the iOS alert raised by "Delete Trip".
Tab app¶
A Music-style app: a TabView of Tabs with the floating Liquid Glass tab bar, horizontally
scrolling artwork and a list underneath.
Health dashboard¶
Summary tiles built from a reusable MetricCard (a GroupBox), with Gauges, a BarMark chart, a
line chart and a linear-capacity gauge, on the grouped background.
Source
import SwiftUI
import "swiftui/components"
NavigationStack {
ScrollView {
VStack(spacing: 14) {
MetricCard(title: "Activity", icon: "flame.fill", color: .red, value: "412",
unit: "/ 600 kcal", caption: "9:41") {
HStack(spacing: 20) {
Gauge(value: 0.69, label: { Text("Move") }, currentValueLabel: { Text("69%") }).tint(.red)
Gauge(value: 0.83, label: { Text("Exercise") }, currentValueLabel: { Text("25") }).tint(.green)
Gauge(value: 0.5, label: { Text("Stand") }, currentValueLabel: { Text("6") }).tint(.cyan)
}
.frame(maxWidth: .infinity)
}
MetricCard(title: "Steps", icon: "figure.walk", color: .orange, value: "8,214",
unit: "steps", caption: "Today") {
BarMark(values: [4.2, 6.8, 5.1, 9.4, 7.7, 3.2, 8.2],
labels: ["M", "T", "W", "T", "F", "S", "S"], height: 120).tint(.orange)
}
MetricCard(title: "Heart Rate", icon: "heart.fill", color: .pink, value: "64",
unit: "BPM", caption: "2 min ago") {
LineMark(values: [72, 68, 75, 64, 70, 66, 62, 64], height: 70).tint(.pink)
}
MetricCard(title: "Sleep", icon: "bed.double.fill", color: .mint, value: "7 h 22 min",
caption: "Last night") {
Gauge(value: 0.92, label: { Text("Goal 8 h") }).gaugeStyle(.linearCapacity).tint(.mint)
}
}
.padding(.horizontal, 16)
}
.navigationTitle("Summary")
.toolbar { ToolbarItem(placement: .topBarTrailing) { Button(systemImage: "person.crop.circle") } }
}Sheet¶
A calendar screen with the graphical DatePicker, presenting a "New Event" sheet whose Form
uses a text field, switches, compact date pickers, a navigation-link Picker, a ColorPicker
and a Stepper.
Empty state and action sheet¶
A ContentUnavailableView for an empty folder, a TipView, glass bottom-bar items, and a
.confirmationDialog presented as the iOS action sheet.
Mac mail¶
A three-column NavigationSplitView on macOS (device="desktop"): the glass sidebar with
mailboxes and unread counts, the message list built from MailRow, and the message with a
toolbar, a ControlGroup and the search field in the title bar.