Skip to content

SwiftUI

Imitates: SwiftUI · iOS 26, iPadOS 26, macOS 26 (Liquid Glass) iOS 26 SDK · Pack id: swiftui · Selected by: pack="swiftui", import SwiftUI · Default device: phone (ios chrome)

86 own elements, plus 89 core elements in this pack's style. Each entry shows the element rendered with sample arguments (and, for the pack's own elements, each of its variants), the role it maps onto, its positional arguments, its defaults and variants.

Pack elements

ActionSheet

Deprecated action sheet

role dialog · arguments title · defaults variant: "action-sheet"

Source
ActionSheet("Title") { Text("Content"); Button("Action") }

Alert

Alert("Delete?", message: "…") { Button("Cancel", role: .cancel) … } — prefer .alert(…)

role dialog · arguments title · defaults variant: "alert"

Source
Alert("Title") { Text("Content"); Button("Action") }

AnyView

Type-erased wrapper

role group

ContentAction
Source
AnyView() { Text("Content"); Button("Action") }

AreaMark

An area chart: AreaMark(values: [..], labels: [..])

role chart · defaults kind: "area"

Source
AreaMark(values: [3, 5, 2, 6, 4])

AsyncImage

AsyncImage(url: "photo.jpg")

role image · arguments url

Source
AsyncImage().frame(width: 160, height: 96)

BarMark

A bar chart: BarMark(values: [..], labels: [..])

role chart · defaults kind: "bar"

Source
BarMark(values: [3, 5, 2, 6, 4])

Button

Button("Save", systemImage:, role: .destructive|.cancel) · .buttonStyle(.bordered|.borderedProminent|.glass|.glassProminent) · .controlSize(.small|.large)

role button · arguments label · variants automatic, borderless, plain, bordered, borderedProminent, glass, glassProminent, link, accessoryBar, accessoryBarAction, card

Labelautomatic
Labelborderless
Labelplain
Labelbordered
LabelborderedProminent
Labelglass
LabelglassProminent
Labellink
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("borderless"); Text("borderless").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("plain"); Text("plain").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("bordered"); Text("bordered").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("borderedProminent"); Text("borderedProminent").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("glass"); Text("glass").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("glassProminent"); Text("glassProminent").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("link"); Text("link").font(.caption).foregroundStyle(.secondary) }
}

Canvas

Canvas drawing placeholder

role placeholder · arguments label

Label
Source
Canvas("Label").frame(width: 160, height: 96)

Card

Not SwiftUI: a rounded content tile like GroupBox

role card · arguments title

Title
ContentAction
Source
Card("Title") { Text("Content"); Button("Action") }

Chart

Swift Charts: Chart(kind: .bar|.line|.area|.pie|.donut, values: [..], labels: [..]) or series: [[..], [..]]

role chart · variants bar, line, area, pie, donut, sparkline

bar
line
area
pie
donut
sparkline
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Chart(values: [3, 5, 2, 6, 4]).variant("bar"); Text("bar").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Chart(values: [3, 5, 2, 6, 4]).variant("line"); Text("line").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Chart(values: [3, 5, 2, 6, 4]).variant("area"); Text("area").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Chart(values: [3, 5, 2, 6, 4]).variant("pie"); Text("pie").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Chart(values: [3, 5, 2, 6, 4]).variant("donut"); Text("donut").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Chart(values: [3, 5, 2, 6, 4]).variant("sparkline"); Text("sparkline").font(.caption).foregroundStyle(.secondary) }
}

ColorPicker

ColorPicker("Tint", selection: .blue) — label with the rainbow colour well

role labeled · arguments label

LabelContentAction
Source
ColorPicker("Label") { Text("Content"); Button("Action") }

ConcentricRectangle

iOS 26 concentric shape

role shape · defaults shape: "rounded"

Source
ConcentricRectangle().frame(width: 160, height: 96)

ConfirmationDialog

Action sheet; prefer .confirmationDialog(…)

role dialog · arguments title · defaults variant: "action-sheet"

Source
ConfirmationDialog("Title") { Text("Content"); Button("Action") }

ContainerRelativeShape

role shape · defaults shape: "rounded"

Source
ContainerRelativeShape().frame(width: 160, height: 96)

ContentUnavailableView

ContentUnavailableView("No Mail", systemImage: "tray", description: Text("…")) { actions }

role dialog · arguments title · defaults inline: True, variant: "unavailable"

Source
ContentUnavailableView("Title") { Text("Content"); Button("Action") }

ControlGroup

ControlGroup { Button … } — joined capsule of buttons

role toolbar · defaults variant: "group" · variants automatic, navigation, palette, compactMenu, menu

automatic
navigation
palette
compactMenu
menu
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { ControlGroup() { Button("Save"); Button("Share") }.variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ControlGroup() { Button("Save"); Button("Share") }.variant("navigation"); Text("navigation").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ControlGroup() { Button("Save"); Button("Share") }.variant("palette"); Text("palette").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ControlGroup() { Button("Save"); Button("Share") }.variant("compactMenu"); Text("compactMenu").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ControlGroup() { Button("Save"); Button("Share") }.variant("menu"); Text("menu").font(.caption).foregroundStyle(.secondary) }
}

DatePicker

DatePicker("Starts", selection: "2026-11-23") — compact grey capsule; .datePickerStyle(.graphical) for the calendar

role datepicker · arguments label · variants automatic, compact, graphical, wheel, field, stepperField

automatic
compact
Label
November 2026
SMTWTFS12345678910111213141516171819202122232425262728293012345
graphical
wheel
field
stepperField
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { DatePicker("Label").variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { DatePicker("Label").variant("compact"); Text("compact").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { DatePicker("Label").variant("graphical"); Text("graphical").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { DatePicker("Label").variant("wheel"); Text("wheel").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { DatePicker("Label").variant("field"); Text("field").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { DatePicker("Label").variant("stepperField"); Text("stepperField").font(.caption).foregroundStyle(.secondary) }
}

DisclosureGroup

DisclosureGroup("Advanced", isExpanded: true) { … }

role accordion · arguments title

Title
Source
DisclosureGroup("Title") { Text("Content"); Button("Action") }

EditButton

Toggles a list's edit mode — plain accent text

role button · arguments label · defaults label: "Edit"

Edit
Source
EditButton()

EmptyView

Renders nothing

role group

ContentAction
Source
EmptyView() { Text("Content"); Button("Action") }

Form

Form { Section { TextField … Toggle … } } — inset-grouped rows

role form · defaults variant: "grouped" · variants automatic, grouped, columns

Name
Notifications
automatic
Name
Notifications
grouped
Name
Notifications
columns
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Form() { TextField("Name"); Toggle("Notifications", isOn: true) }.variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Form() { TextField("Name"); Toggle("Notifications", isOn: true) }.variant("grouped"); Text("grouped").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Form() { TextField("Name"); Toggle("Notifications", isOn: true) }.variant("columns"); Text("columns").font(.caption).foregroundStyle(.secondary) }
}

Gauge

Gauge(value: 0.7, label: { Text("BPM") }, currentValueLabel: { Text("72") }) · .gaugeStyle(…)

role progress · arguments value · defaults variant: "accessoryCircular" · variants automatic, accessoryCircular, accessoryCircularCapacity, accessoryLinear, accessoryLinearCapacity, linearCapacity

automatic
accessoryCircular
accessoryCircularCapacity
accessoryLinear
accessoryLinearCapacity
linearCapacity
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Gauge(60).variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Gauge(60).variant("accessoryCircular"); Text("accessoryCircular").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Gauge(60).variant("accessoryCircularCapacity"); Text("accessoryCircularCapacity").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Gauge(60).variant("accessoryLinear"); Text("accessoryLinear").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Gauge(60).variant("accessoryLinearCapacity"); Text("accessoryLinearCapacity").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Gauge(60).variant("linearCapacity"); Text("linearCapacity").font(.caption).foregroundStyle(.secondary) }
}

GeometryReader

Transparent container (stacked)

role vstack

ContentAction
Source
GeometryReader() { Text("Content"); Button("Action") }

GlassEffectContainer

iOS 26: groups glass shapes; renders as an HStack

role hstack

ContentAction
Source
GlassEffectContainer() { Text("Content"); Button("Action") }

GroupBox

GroupBox("Activity") { … } — rounded secondary-background box

role card · arguments title

Title
ContentAction
Source
GroupBox("Title") { Text("Content"); Button("Action") }

HSplitView

macOS horizontal split

role hstack

ContentAction
Source
HSplitView() { Text("Content"); Button("Action") }

macOS round help (?) button

role button · defaults iconOnly: True, systemImage: "questionmark", variant: "help"

Source
HelpLink()

Image

Image("asset.png") or Image(systemName: "star.fill")

role image · arguments name

Source
Image().frame(width: 160, height: 96)

Inspector

Inline inspector panel content (prefer the .inspector modifier)

role card · arguments title

Title
ContentAction
Source
Inspector("Title") { Text("Content"); Button("Action") }

Label

Label("Inbox", systemImage: "tray"); .labelStyle(.iconOnly|.titleOnly|.titleAndIcon)

role label · arguments title

Title
Source
Label("Title")

LabeledContent

LabeledContent("Version", value: "26.1") — label + secondary value

role labeled · arguments label, value

LabelContentAction
Source
LabeledContent("Label", "Value") { Text("Content"); Button("Action") }

LineMark

A line chart: LineMark(values: [..], labels: [..])

role chart · defaults kind: "line"

Source
LineMark(values: [3, 5, 2, 6, 4])

Link("Privacy Policy", destination: url) — accent text

role link · arguments label, destination

Label
Source
Link("Label")

List

List { Section("…") { … } } — inset-grouped by default; .listStyle(.plain|.sidebar|.grouped)

role list · defaults variant: "insetGrouped" · variants automatic, insetGrouped, grouped, inset, plain, sidebar, bordered

First item
Second item
automatic
First item
Second item
insetGrouped
First item
Second item
grouped
First item
Second item
inset
First item
Second item
plain
First item
Second item
sidebar
First item
Second item
bordered
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { List() { Text("First item"); Text("Second item") }.variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { List() { Text("First item"); Text("Second item") }.variant("insetGrouped"); Text("insetGrouped").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { List() { Text("First item"); Text("Second item") }.variant("grouped"); Text("grouped").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { List() { Text("First item"); Text("Second item") }.variant("inset"); Text("inset").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { List() { Text("First item"); Text("Second item") }.variant("plain"); Text("plain").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { List() { Text("First item"); Text("Second item") }.variant("sidebar"); Text("sidebar").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { List() { Text("First item"); Text("Second item") }.variant("bordered"); Text("bordered").font(.caption).foregroundStyle(.secondary) }
}

Map

MapKit map placeholder (streets, park, water, pin)

role placeholder · arguments label · defaults systemImage: "mappin"

Label
Source
Map("Label").frame(width: 160, height: 96)

Menu("Sort", systemImage:) { Button … } · open: true shows the glass menu

role menu · arguments label

Label
Source
Menu("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }

MultiDatePicker

MultiDatePicker("Dates", selection:) — calendar with several marked days (events:)

role calendar · arguments label

Label
November 2026
SMTWTFS12345678910111213141516171819202122232425262728293012345
Source
MultiDatePicker("Label")

NavigationLink("General", systemImage: "gear", iconColor: .gray) — row with chevron

role listitem · arguments title · defaults chevron: True

Title
Source
NavigationLink("Title")

NavigationSplitView { sidebar } content: { … } detail: { … }

role split · variants automatic, balanced, prominentDetail

Content
Action
automatic
Content
Action
balanced
Content
Action
prominentDetail
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { NavigationSplitView() { Text("Content"); Button("Action") }.variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { NavigationSplitView() { Text("Content"); Button("Action") }.variant("balanced"); Text("balanced").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { NavigationSplitView() { Text("Content"); Button("Action") }.variant("prominentDetail"); Text("prominentDetail").font(.caption).foregroundStyle(.secondary) }
}

NavigationStack { … .navigationTitle("Title") .toolbar { … } } · back: "Settings" shows the glass back button

role navstack

ContentAction
Source
NavigationStack() { Text("Content"); Button("Action") }

Deprecated alias of NavigationStack

role navstack

ContentAction
Source
NavigationView() { Text("Content"); Button("Action") }

OutlineGroup

Hierarchical rows; written here as a DisclosureGroup-like node: OutlineGroup("Folder", isExpanded: true) { … }

role accordion · arguments title

Title
Source
OutlineGroup("Title") { Text("Content"); Button("Action") }

PasteButton

System paste button (bordered capsule)

role button · arguments label · defaults label: "Paste", systemImage: "doc.on.clipboard", variant: "bordered"

Paste
Source
PasteButton()

PhotosPicker

PhotosPicker("Select Photos", selection:) — opens the photo picker

role button · arguments label · defaults label: "Select Photos", systemImage: "photo"

Select Photos
Source
PhotosPicker()

Picker

Picker("Sort", selection: "Date") { Text("Date") … } · .pickerStyle(.segmented|.inline|.navigationLink)

role select · arguments label · defaults variant: "menu" · variants automatic, menu, segmented, inline, radioGroup, wheel, navigationLink, palette

automatic
menu
Label
segmented
Label
inline
Label
radioGroup
wheel
navigationLink
palette
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Picker("Label").variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Picker("Label").variant("menu"); Text("menu").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Picker("Label").variant("segmented"); Text("segmented").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Picker("Label").variant("inline"); Text("inline").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Picker("Label").variant("radioGroup"); Text("radioGroup").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Picker("Label").variant("wheel"); Text("wheel").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Picker("Label").variant("navigationLink"); Text("navigationLink").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Picker("Label").variant("palette"); Text("palette").font(.caption).foregroundStyle(.secondary) }
}

PointMark

A point/line chart: PointMark(values: [..])

role chart · defaults kind: "line"

Source
PointMark(values: [3, 5, 2, 6, 4])

Popover

Popover bubble; prefer .popover(isPresented:)

role dialog · arguments title · defaults variant: "popover"

Source
Popover("Title") { Text("Content"); Button("Action") }

ProgressView

ProgressView() spinner, or ProgressView("Uploading", value: 0.4)

role progress · arguments label · variants automatic, linear, circular

Label
automatic
Label
linear
Label
circular
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { ProgressView("Label").variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ProgressView("Label").variant("linear"); Text("linear").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ProgressView("Label").variant("circular"); Text("circular").font(.caption).foregroundStyle(.secondary) }
}

RealityView

RealityKit view placeholder

role placeholder · arguments label · defaults systemImage: "cube"

Label
Source
RealityView("Label").frame(width: 160, height: 96)

RenameButton

Triggers a rename action

role button · arguments label · defaults label: "Rename", systemImage: "pencil"

Rename
Source
RenameButton()

Row

Generic row: title, subtitle:, detail:, systemImage:, iconColor:, chevron:

role listitem · arguments title

Title
Source
Row("Title")

SceneView

SceneKit / RealityKit view placeholder

role placeholder · arguments label · defaults systemImage: "cube"

Label
Source
SceneView("Label").frame(width: 160, height: 96)

ScrollView

ScrollView { … } or ScrollView(.horizontal) { … }

role scroll · arguments axes

ContentAction
Source
ScrollView() { Text("Content"); Button("Action") }

ScrollViewReader

Transparent container

role group

ContentAction
Source
ScrollViewReader() { Text("Content"); Button("Action") }

Section

Section("Header") { … } footer: { Text("…") }

role section · arguments title

Title
First itemSecond item
Source
Section("Title") { Text("First item"); Text("Second item") }

SectorMark

A donut chart: SectorMark(values: [..], labels: [..])

role chart · defaults kind: "donut"

Source
SectorMark(values: [3, 5, 2, 6, 4])

SecureField

SecureField("Password", text: $password)

role textfield · arguments placeholder · defaults kind: "password" · variants automatic, plain, roundedBorder

Placeholder
automatic
Placeholder
plain
Placeholder
roundedBorder
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { SecureField("Placeholder").variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { SecureField("Placeholder").variant("plain"); Text("plain").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { SecureField("Placeholder").variant("roundedBorder"); Text("roundedBorder").font(.caption).foregroundStyle(.secondary) }
}

macOS button that opens the Settings window

role button · arguments label · defaults label: "Settings…"

Settings…
Source
SettingsLink()

ShareLink(item: url) — share-sheet button

role button · arguments label · defaults label: "Share", systemImage: "square.and.arrow.up"

Share
Source
ShareLink()

Sheet

Bottom sheet; prefer .sheet(isPresented:) { … }

role dialog · arguments title · defaults variant: "sheet"

Source
Sheet("Title") { Text("Content"); Button("Action") }

SignInWithAppleButton

AuthenticationServices button — black capsule (white in dark)

role button · arguments label · defaults label: "Sign in with Apple", variant: "signInWithApple"

Sign in with Apple
Source
SignInWithAppleButton()

Slider

Slider(value: 0.4) { Text("Volume") } minimumValueLabel: { Image(systemName: "speaker") } …

role slider

Source
Slider()

SpriteView

SpriteKit scene placeholder

role placeholder · arguments label · defaults systemImage: "sparkles"

Label
Source
SpriteView("Label").frame(width: 160, height: 96)

Stepper

Stepper("Guests", value: 2) — −/+ capsule

role stepper · arguments label

Label
Source
Stepper("Label")

Tab

Tab("Search", systemImage: "magnifyingglass") { … } · .badge(3)

role tab · arguments label

Source
Tab("Label")

TabSection

A group of Tabs (sidebar-adaptable TabView)

role section · arguments title

Title
First itemSecond item
Source
TabSection("Title") { Text("First item"); Text("Second item") }

TabView

TabView { Tab("Home", systemImage: "house") { … } } — floating Liquid Glass tab bar

role tabs · defaults placement: "bottom" · variants automatic, page, sidebarAdaptable, tabBarOnly

OneTwo
First tab
automatic
OneTwo
First tab
page
OneTwo
First tab
sidebarAdaptable
OneTwo
First tab
tabBarOnly
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { TabView() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }.variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { TabView() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }.variant("page"); Text("page").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { TabView() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }.variant("sidebarAdaptable"); Text("sidebarAdaptable").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { TabView() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }.variant("tabBarOnly"); Text("tabBarOnly").font(.caption).foregroundStyle(.secondary) }
}

Table

Table(columns: ["Name", "Size"], rows: [[…]]) or TableColumn / TableRow children — macOS/iPadOS table

role table · variants automatic, inset, bordered

NameStatus
Ana LimaActive
Ben OkaforAway
automatic
NameStatus
Ana LimaActive
Ben OkaforAway
inset
NameStatus
Ana LimaActive
Ben OkaforAway
bordered
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Table(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]]).variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Table(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]]).variant("inset"); Text("inset").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Table(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]]).variant("bordered"); Text("bordered").font(.caption).foregroundStyle(.secondary) }
}

TableColumn

TableColumn("Name")

role tablecolumn · arguments title

Source
TableColumn("Title")

TableRow

TableRow { Text(…) … }

role tablerow

Source
TableRow()

Text

Text("Hello") with bold, italic, code; .font(.headline) etc.

role text · arguments content

Content
Source
Text("Content")

TextEditor

TextEditor(text: $notes) — multi-line editor

role textfield · arguments text · defaults kind: "multiline"

Text
Source
TextEditor("Text")

TextField

TextField("Email", text: $email); plain in a Form, .textFieldStyle(.roundedBorder) elsewhere; axis: .vertical

role textfield · arguments placeholder · variants automatic, plain, roundedBorder

Placeholder
automatic
Placeholder
plain
Placeholder
roundedBorder
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { TextField("Placeholder").variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { TextField("Placeholder").variant("plain"); Text("plain").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { TextField("Placeholder").variant("roundedBorder"); Text("roundedBorder").font(.caption).foregroundStyle(.secondary) }
}

TimelineView

Transparent container

role group

ContentAction
Source
TimelineView() { Text("Content"); Button("Action") }

TipView

TipKit tip: TipView("Favorites", message: "Tap the star…")

role alert · arguments title · defaults closable: True, systemImage: "lightbulb"

Source
TipView("Title")

Toggle

Toggle("Wi-Fi", isOn: true) — 51×31 green switch; .toggleStyle(.button|.checkbox)

role toggle · arguments label · variants automatic, switch, button, checkbox

Labelautomatic
Labelswitch
Labelbutton
Labelcheckbox
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Toggle("Label").variant("automatic"); Text("automatic").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Toggle("Label").variant("switch"); Text("switch").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Toggle("Label").variant("button"); Text("button").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Toggle("Label").variant("checkbox"); Text("checkbox").font(.caption).foregroundStyle(.secondary) }
}

Toolbar

Not SwiftUI: an inline bar of controls

role toolbar

Source
Toolbar() { Button("Save"); Button("Share") }

ToolbarItem

ToolbarItem(placement: .topBarTrailing|.topBarLeading|.principal|.bottomBar) { … }

role toolbaritem

ContentAction
Source
ToolbarItem() { Text("Content"); Button("Action") }

ToolbarItemGroup

ToolbarItemGroup(placement: .bottomBar) { … }

role toolbaritem

ContentAction
Source
ToolbarItemGroup() { Text("Content"); Button("Action") }

ToolbarSpacer

iOS 26: separates toolbar glass groups (.fixed / .flexible)

role spacer

Source
ToolbarSpacer()

UnevenRoundedRectangle

role shape · defaults shape: "rounded"

Source
UnevenRoundedRectangle().frame(width: 160, height: 96)

VSplitView

macOS vertical split

role vstack

ContentAction
Source
VSplitView() { Text("Content"); Button("Action") }

VideoPlayer

AVKit video placeholder with play button

role placeholder · arguments label · defaults systemImage: "play"

Label
Source
VideoPlayer("Label").frame(width: 160, height: 96)

ViewThatFits

Renders all candidates; keep one child

role group

ContentAction
Source
ViewThatFits() { Text("Content"); Button("Action") }

WebView

iOS 26 SwiftUI WebView placeholder

role placeholder · arguments label · defaults systemImage: "globe"

Label
Source
WebView("Label").frame(width: 160, height: 96)

WindowGroup

Scene wrapper, accepted so App code pastes

role group

ContentAction
Source
WindowGroup() { Text("Content"); Button("Action") }

Core vocabulary in this style

Accordion

role accordion · arguments title

Title
Source
Accordion("Title") { Text("Content"); Button("Action") }

AppBar

role appbar · arguments title

Source
AppBar("Title") { Text("Content"); Button("Action") }

AreaChart

role chart · defaults kind: "area"

Source
AreaChart(values: [3, 5, 2, 6, 4])

Avatar

role avatar · arguments name

AL
Source
Avatar("Ana Lima")

Badge

role badge · arguments text

Text
Source
Badge("Text")

role alert · arguments title

Source
Banner("Title")

BarChart

role chart · defaults kind: "bar"

Source
BarChart(values: [3, 5, 2, 6, 4])

Board

Kanban board of BoardColumn children

role board

To do1
Write copy
Add card
Source
Board() { BoardColumn("To do") { KanbanCard("Write copy") } }

BoardColumn

BoardColumn("To do", count:, color:) { KanbanCard(…) }

role boardcolumn · arguments title

Title2
Write copy
Review
Add card
Source
BoardColumn("Title") { KanbanCard("Write copy"); KanbanCard("Review") }

role breadcrumb · arguments items

Source
Breadcrumb(["One", "Two", "Three"])

BubbleChart

role chart · defaults kind: "bubble"

Source
BubbleChart(values: [3, 5, 2, 6, 4])

Calendar

role calendar

November 2026
SMTWTFS12345678910111213141516171819202122232425262728293012345
Source
Calendar()

Callout

a numbered annotation; place with .position(x:y:)

role callout · arguments number, text

1Text
Source
Callout(1, "Text")

CandlestickChart

role chart · defaults kind: "candlestick"

Source
CandlestickChart(values: [3, 5, 2, 6, 4])

Capsule

role shape · defaults shape: "capsule"

Source
Capsule().frame(width: 160, height: 96)

Checkbox

role checkbox · arguments label

Label
Source
Checkbox("Label")

Chip

role chip · arguments label

Label
Source
Chip("Label")

Circle

role shape · defaults shape: "circle"

Source
Circle().frame(width: 160, height: 96)

CodeBlock

role code · arguments code · defaults lineNumbers: False

let total = items.count
Source
CodeBlock("let total = items.count")

CodeEditor

CodeEditor("…", language: "swift", lineNumbers:, highlight: [3], tabs: [..])

role code · arguments code

1let total = items.count
Source
CodeEditor("let total = items.count")

Color

role color · arguments color

Source
Color(.blue).frame(width: 160, height: 96)

ColorSwatches

colors: [.red, "#0af", …], selection:

role swatches

Source
ColorSwatches()

ComboChart

role chart · defaults kind: "combo"

Source
ComboChart(values: [3, 5, 2, 6, 4])

Comment

author:, time:, avatar:

role message · arguments text · defaults variant: "comment"

Text
Source
Comment("Text")

Dialog

role dialog · arguments title

Source
Dialog("Title") { Text("Content"); Button("Action") }

Divider

role divider

Source
Divider()

DonutChart

role chart · defaults kind: "donut"

Source
DonutChart(values: [3, 5, 2, 6, 4])

Dropzone

role dropzone · arguments label

Label
Source
Dropzone("Label")

Ellipse

role shape · defaults shape: "ellipse"

Source
Ellipse().frame(width: 160, height: 96)

EmptyState

title, systemImage:, description: { actions }

role emptystate · arguments title

Title
Source
EmptyState("Title")

FloatingActionButton

role fab · arguments icon

Source
FloatingActionButton("star")

FunnelChart

role chart · defaults kind: "funnel"

Source
FunnelChart(values: [3, 5, 2, 6, 4])

Gantt

scale: ["W1",…], tasks: [("Design", 0, 2, 0.6), …], today:

role gantt

1234567
Design
Build
Source
Gantt(tasks: [("Design", 0, 3), ("Build", 2, 5)])

GaugeChart

role chart · defaults kind: "gauge"

Source
GaugeChart(values: [3, 5, 2, 6, 4])

Grid

Grid of GridRow children, or columns: n

role grid

ContentAction
Source
Grid() { Text("Content"); Button("Action") }

GridRow

role gridrow

ContentAction
Source
GridRow() { Text("Content"); Button("Action") }

Group

role group

ContentAction
Source
Group() { Text("Content"); Button("Action") }

HStack

Horizontal stack. spacing:, alignment: .top|.center|.bottom

role hstack

ContentAction
Source
HStack() { Text("Content"); Button("Action") }

Heatmap

role chart · defaults kind: "heatmap"

Source
Heatmap(values: [3, 5, 2, 6, 4])

Histogram

role chart · defaults kind: "histogram"

Source
Histogram(values: [3, 5, 2, 6, 4])

Icon

role icon · arguments name

Source
Icon("star")

IconButton

role button · arguments icon · defaults iconOnly: True

Source
IconButton("star")

KanbanCard

title, description:, tags: [..], assignees: [..], due:, comments:, priority:

role kanbancard · arguments title

Title
Source
KanbanCard("Title")

Kbd

Kbd(["⌘", "K"]) or Kbd("Esc")

role kbd · arguments keys

⌘K
Source
Kbd(["⌘", "K"])

LazyHGrid

role grid

ContentAction
Source
LazyHGrid() { Text("Content"); Button("Action") }

LazyHStack

role hstack

ContentAction
Source
LazyHStack() { Text("Content"); Button("Action") }

LazyVGrid

columns: [GridItem(.flexible()), …] or a count

role grid

ContentAction
Source
LazyVGrid() { Text("Content"); Button("Action") }

LazyVStack

role vstack

ContentAction
Source
LazyVStack() { Text("Content"); Button("Action") }

LineChart

role chart · defaults kind: "line"

Source
LineChart(values: [3, 5, 2, 6, 4])

ListItem

role listitem · arguments title

Title
Source
ListItem("Title")

role menuitem · arguments label

Source
MenuItem("Label")

MessageBubble

MessageBubble("Hi", from: .me|.them, author:, time:, status:, reactions: [..])

role message · arguments text

Text
Source
MessageBubble("Text")

role navitem · arguments label

Label
Source
NavItem("Label")

Pagination

role pagination

Source
Pagination()

PieChart

role chart · defaults kind: "pie"

Source
PieChart(values: [3, 5, 2, 6, 4])

Placeholder

A labelled box for maps, charts, media

role placeholder · arguments label

Label
Source
Placeholder("Label").frame(width: 160, height: 96)

Pointer

Pointer(.arrow|.hand|.ibeam|.grab|.crosshair|.touch); place with .position

role pointer · arguments kind

Source
Pointer(.arrow)

RadarChart

role chart · defaults kind: "radar"

Source
RadarChart(values: [3, 5, 2, 6, 4])

RadioButton

role radio · arguments label

Label
Source
RadioButton("Label")

RadioGroup

role radiogroup · arguments label

Label
Source
RadioGroup("Label")

Rating

role rating · arguments value

Source
Rating(60)

Rectangle

role shape · defaults shape: "rectangle"

Source
Rectangle().frame(width: 160, height: 96)

RoundedRectangle

role shape · defaults shape: "rounded"

Source
RoundedRectangle().frame(width: 160, height: 96)

ScatterChart

role chart · defaults kind: "scatter"

Source
ScatterChart(values: [3, 5, 2, 6, 4])

Schedule

days: [..], startHour:, endHour:, events: [("Standup", "Mon", 9, 9.5, .blue)], now:

role schedule

8:009:0010:0011:0012:0013:0014:0015:0016:0017:00
Mon
Tue
Wed
Thu
Fri
Source
Schedule()

SearchField

role textfield · arguments placeholder · defaults kind: "search"

Placeholder
Source
SearchField("Placeholder")

SegmentedControl

role segmented · arguments items

OneTwoThree
Source
SegmentedControl(["One", "Two", "Three"])

SelectionRect

a drag-selection rectangle; size with .frame, place with .position

role marquee

Source
SelectionRect()

role sidebar · arguments title

Source
Sidebar("Title") { Text("Content"); Button("Action") }

Skeleton

lines:, avatar:, image:, shape: .circle|.rectangle|.text

role skeleton

Source
Skeleton().frame(width: 160, height: 96)

Spacer

role spacer

Source
Spacer()

Sparkline

role chart · arguments values · defaults kind: "sparkline"

Source
Sparkline([3, 5, 2, 6, 4], values: [3, 5, 2, 6, 4])

Spreadsheet

rows: [[…]], selection: "B2:C4", active:, formula:, sheets: [..], highlight: ["B3": .yellow]

role spreadsheet

AB
1AB
212
334
Source
Spreadsheet(columns: ["A", "B"], rows: [[1, 2], [3, 4]])

Stat

Stat("Revenue", "$48k", change: "+12%", trend: [..], systemImage:)

role stat · arguments label, value

Label
60
Source
Stat("Label", 60)

Steps

role steps · arguments steps

1Cart
2Shipping
3Payment
Source
Steps(["Cart", "Shipping", "Payment"])

StickyNote

StickyNote("Call Ana", color: .yellow, rotation: -2, author:)

role stickynote · arguments text

Text
Source
StickyNote("Text")

Tabs

role tabs · arguments items · defaults placement: "top"

OneTwo
First tab
Source
Tabs(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }

Tag

role chip · arguments label

Label
Source
Tag("Label")

Terminal

lines starting with "$ " are commands

role code · arguments code · defaults variant: "terminal"

Terminal
let total = items.count
Source
Terminal("let total = items.count")

Timeline

role timeline

Created
Shipped
Source
Timeline() { TimelineItem("Created"); TimelineItem("Shipped") }

TimelineItem

title, time:, description:, systemImage:, status:

role timelineitem · arguments title

Title
Source
TimelineItem("Title")

Toast

role toast · arguments message

Message
Source
Toast("Message")

Tooltip

role tooltip · arguments text

ContentActionText
Source
Tooltip("Text") { Text("Content"); Button("Action") }

Tree

Tree { TreeItem("src") { TreeItem("main.swift") } }

role tree

Folder
File
Source
Tree() { TreeItem("Folder") { TreeItem("File") } }

TreeItem

label, systemImage:, folder:, expanded:, selected:, detail:

role treeitem · arguments label

Label
Source
TreeItem("Label")

Treemap

role chart · defaults kind: "treemap"

Source
Treemap(values: [3, 5, 2, 6, 4])

VStack

Vertical stack. spacing:, alignment: .leading|.center|.trailing

role vstack

ContentAction
Source
VStack() { Text("Content"); Button("Action") }

Whiteboard

role canvas · defaults grid: "dots"

ContentAction
Source
Whiteboard() { Text("Content"); Button("Action") }.frame(width: 160, height: 96)

ZStack

Overlapping layers. alignment:

role zstack

ContentAction
Source
ZStack() { Text("Content"); Button("Action") }