Skip to content

Mac OS 9 (Platinum)

Imitates: Mac OS 8 / 9 Platinum appearance (Appearance Manager, 1997–2001) Mac OS 9.2 · Pack id: macos9 · Selected by: pack="macos9", import MacOS9, import Platinum, import MacOS8 · Default device: desktop (window chrome)

54 own elements, plus 120 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

Alert

A modal alert with the Stop / Note / Caution icon: severity: .stop | .note | .caution; buttons:, primary:

role dialog · arguments title · defaults icon: "exclamationmark.triangle", severity: "caution", variant: "alert" · variants alert

alert
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Alert("Title") { Text("Content"); Button("Action") }.variant("alert"); Text("alert").font(.caption).foregroundStyle(.secondary) }
}

AppleMenu

The Apple menu at the left of the menu bar (a neutral rainbow glyph); open: true shows its items

role menu · defaults caret: False, icon: "circle"

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

ApplicationIcon

An application icon (the generic diamond)

role label · arguments title · defaults icon: "app", kind: "application"

Title
Source
ApplicationIcon("Title")

ApplicationMenu

The Application menu at the right of the menu bar: icon and name of the frontmost application

role menu · arguments label · defaults caret: False, icon: "app"

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

AsyncArrows

The chasing-arrows busy indicator

role progress · defaults kind: "circular"

Source
AsyncArrows()

Balloon

Balloon help: Balloon("Click to empty the Trash.") { target view }; placement:

role tooltip · arguments text

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

BevelButton

A square bevel button (toolbar-style); icon:, .selected() for the pressed state

role button · arguments label · defaults variant: "bevel"

Label
Source
BevelButton("Label")

Button

A Platinum push button. .variant(.default) (or DefaultButton) draws the default ring

role button · arguments label · variants push, default, bevel

Labelpush
Labeldefault
Labelbevel
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("push"); Text("push").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("bevel"); Text("bevel").font(.caption).foregroundStyle(.secondary) }
}

CheckBox

A Platinum check box; checked: true | .mixed

role checkbox · arguments label

Label
Source
CheckBox("Label")

ControlPanel

A control panel window (platinum body); combine with Tabs, GroupBox, PopupMenu …

role card · arguments title · defaults variant: "panel"

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

ControlStrip

The Control Strip: ControlStripModule children; place at the bottom-left of the Desktop

role toolbar

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

ControlStripModule

One Control Strip module (icon + popup arrow)

role button · arguments icon · defaults dropdown: True, iconOnly: True

Source
ControlStripModule("star")

DefaultButton

The default push button with its thick outline (Return activates it)

role button · arguments label · defaults variant: "default"

Label
Source
DefaultButton("Label")

Desktop

The Finder desktop (pattern background). Put a MenuBar first, then place windows and icons with .position(x:y:)

role canvas

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

Dialog

A centred modal dialog (Mac OS 9 has no sheets)

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

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

DisclosureTriangle

A disclosure triangle with its label; expanded: true shows the content

role accordion · arguments title

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

Disk

A hard disk icon

role label · arguments title · defaults icon: "archivebox", kind: "disk"

Title
Source
Disk("Title")

DocumentIcon

A document icon

role label · arguments title · defaults icon: "doc", kind: "document"

Title
Source
DocumentIcon("Title")

DocumentWindow

A document window

role card · arguments title · defaults variant: "document"

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

EditText

An edit-text field (Toolbox name)

role textfield · arguments placeholder

Placeholder
Source
EditText("Placeholder")

Finder

A Finder window; put an InfoBar, then FinderIcon/Folder… (icon view) or a FinderList (list view) inside

role card · arguments title · defaults variant: "document"

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

FinderIcon

A Finder / desktop icon with its name below. icon: any icon name; .selected() inverts the name

role label · arguments title

Title
Source
FinderIcon("Title")

FinderList

Finder list view: columns: ["Name", "Date Modified", "Size", "Kind"], rows:, sortColumn:, selectedRows:

role table

NameStatus
Ana LimaActive
Ben OkaforAway
Source
FinderList(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])

FloatingWindow

A floating palette / utility window with a thin title bar

role card · arguments title · defaults variant: "utility"

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

Folder

A folder icon

role label · arguments title · defaults icon: "folder", kind: "folder"

Title
Source
Folder("Title")

GroupBox

A primary group box (etched frame, title on the frame)

role card · arguments title · defaults variant: "group"

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

InfoBar

The Finder window header: InfoBar("12 items", "1.2 GB available")

role labeled · arguments label, value

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

ListItem

A list row

role listitem · arguments title

Title
Source
ListItem("Title")

ListView

A list box (white, inset frame); Row/ListItem children, .selected() highlights

role list

First item
Second item
Source
ListView() { Text("First item"); Text("Second item") }

LittleArrows

The little up/down arrows control beside a number field

role stepper · arguments label

Label
Source
LittleArrows("Label")

The menu bar: AppleMenu(), Menu("File") …, Spacer(), Text(clock), ApplicationMenu("Finder")

role toolbar

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

A menu item. shortcut: "⌘N", checked:, .disabled(), .highlighted() (the item under the pointer)

role menuitem · arguments label

Source
MenuItem("Label")

A menu bar title; MenuTitle("File", open: true) { MenuItem(…) } shows its menu

role menu · arguments label · defaults caret: False

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

ModalDialog

A modal dialog drawn in place (no title bar); use Dialog for a centred overlay

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

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

MovableModalDialog

A movable modal dialog: title bar without close box

role card · arguments title · defaults variant: "movableModal"

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

PasswordField

A password field (bullets)

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

Placeholder
Source
PasswordField("Placeholder")

PopupMenu

A popup menu button with the double arrow; PopupMenu("Font:", items: […], selection:, open:)

role select · arguments label

Source
PopupMenu("Label")

ProgressBar

A progress bar; value: 0…1, or no value for the (static) blue barber pole

role progress · arguments label

Label
Source
ProgressBar("Label")

PullDownMenu

A pull-down menu (menu bar title or bevel button menu)

role menu · arguments label · defaults caret: False

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

PushButton

A Platinum push button

role button · arguments label

Label
Source
PushButton("Label")

RadioButton

A Platinum radio button

role radio · arguments label

Label
Source
RadioButton("Label")

RadioGroup

RadioGroup("Size", items: […], selection:)

role radiogroup · arguments label

Label
Source
RadioGroup("Label")

ScrollArea

A scrolling content area with Platinum scroll bars (arrows together at the bottom / right)

role scroll · defaults variant: "both" · variants both, vertical, horizontal, none

ContentAction
both
ContentAction
vertical
ContentAction
horizontal
ContentAction
none
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { ScrollArea() { Text("Content"); Button("Action") }.variant("both"); Text("both").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ScrollArea() { Text("Content"); Button("Action") }.variant("vertical"); Text("vertical").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ScrollArea() { Text("Content"); Button("Action") }.variant("horizontal"); Text("horizontal").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ScrollArea() { Text("Content"); Button("Action") }.variant("none"); Text("none").font(.caption).foregroundStyle(.secondary) }
}

SearchField

A Sherlock-style search field

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

Placeholder
Source
SearchField("Placeholder")

SecondaryGroupBox

A secondary group box (lighter etched frame)

role card · arguments title · defaults variant: "secondary"

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

Separator

An etched separator line

role divider

Source
Separator()

Slider

A Platinum slider with the pointed thumb; Slider("Volume:", value: 0.4, ticks: 5)

role slider · arguments label

Label
Source
Slider("Label")

StickyNote

A Stickies note

role stickynote · arguments text

Text
Source
StickyNote("Text")

TabControl

Platinum tab control (Toolbox name)

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

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

Tabs

Platinum tab control (as in the Appearance control panel); Tab("Fonts") { … } children

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") } }

TextField

An edit-text field with the inset frame; .state(.focused) draws the focus ring

role textfield · arguments placeholder

Placeholder
Source
TextField("Placeholder")

Toolbar

A window toolbar of BevelButtons (application-drawn, platinum)

role toolbar

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

TrashIcon

The Trash

role label · arguments title · defaults icon: "trash", kind: "trash", title: "Trash"

Trash
Source
TrashIcon()

Window

A Platinum window: striped title bar, close box, zoom and collapse boxes. .inactive() greys the title bar

role card · arguments title · defaults variant: "document" · variants document, dialog, movableModal, alert, utility, floating, plain

Title
ContentAction
document
Title
ContentAction
dialog
Title
ContentAction
movableModal
Title
ContentAction
alert
Title
ContentAction
utility
Title
ContentAction
floating
Title
ContentAction
plain
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("document"); Text("document").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("dialog"); Text("dialog").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("movableModal"); Text("movableModal").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("alert"); Text("alert").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("utility"); Text("utility").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("floating"); Text("floating").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("plain"); Text("plain").font(.caption).foregroundStyle(.secondary) }
}

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])

AsyncImage

role image · arguments url

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

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
SuMoTuWeThFrSa12345678910111213141516171819202122232425262728293012345
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])

Canvas

free-form area; place children with .position(x:y:); grid: .dots|.lines

role canvas

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

Capsule

role shape · defaults shape: "capsule"

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

Card

role card · arguments title

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

Chart

kind: .bar|.line|.area|.pie|.donut|.scatter|.bubble|.radar|.heatmap|.funnel|.treemap|.gauge|.candlestick|.combo|.sparkline; values:/series:/labels:/points:/matrix:

role chart

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

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")

ControlGroup

role toolbar · defaults variant: "group"

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

DatePicker

selection: "2026-11-23"; .datePickerStyle(.graphical)

role datepicker · arguments label

Source
DatePicker("Label")

DisclosureGroup

role accordion · arguments title

Title
Source
DisclosureGroup("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")

Form

role form

Name
Notifications
Source
Form() { TextField("Name"); Toggle("Notifications", isOn: true) }

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)])

Gauge

role progress · arguments value · defaults variant: "gauge"

Source
Gauge(60)

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")

Image

Image("path.png") or Image(systemName: "star")

role image · arguments name

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

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"])

Label

Label("Inbox", systemImage: "tray")

role label · arguments title

Title
Source
Label("Title")

LabeledContent

role labeled · arguments label, value

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

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])

role link · arguments label, destination

Label
Source
Link("Label")

List

.listStyle(.insetGrouped|.plain|.sidebar|…)

role list

First item
Second item
Source
List() { Text("First item"); Text("Second item") }

Map

pins: [(x%, y%, "label")], route:, showsUserLocation:, height:

role map

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

role menu · arguments label

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

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")

role listitem · arguments title · defaults chevron: True

Title
Source
NavigationLink("Title")

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

role split

Content
Action
Source
NavigationSplitView() { Text("Content"); Button("Action") }

Content's .navigationTitle / .toolbar form the bar

role navstack

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

role navstack

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

Pagination

role pagination

Source
Pagination()

Picker

Picker("Size", selection: "M") { Text("S") … }

role select · arguments label

Source
Picker("Label")

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)

ProgressView

value: 0…1 (or total:); none = indeterminate

role progress · arguments label

Label
Source
ProgressView("Label")

RadarChart

role chart · defaults kind: "radar"

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

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)

Row

title, subtitle:, detail:, systemImage:, chevron:

role listitem · arguments title

Title
Source
Row("Title")

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()

ScrollView

role scroll · arguments axes

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

Section

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

role section · arguments title

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

SecureField

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

Placeholder
Source
SecureField("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()

Sheet

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

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

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)

Stepper

role stepper · arguments label

Label
Source
Stepper("Label")

Steps

role steps · arguments steps

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

Tab

Tab("Home", systemImage: "house") { … }

role tab · arguments label

Source
Tab("Label")

TabView

Children with .tabItem { Label } or Tab(…)

role tabs · defaults placement: "bottom"

OneTwo
First tab
Source
TabView() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }

Table

columns: ["Name", …], rows: [[…], …] or TableRow children

role table

NameStatus
Ana LimaActive
Ben OkaforAway
Source
Table(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])

TableColumn

role tablecolumn · arguments title

Source
TableColumn("Title")

TableRow

role tablerow

Source
TableRow()

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")

Text

Text with bold, italic, code Markdown

role text · arguments content

Content
Source
Text("Content")

TextEditor

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

Text
Source
TextEditor("Text")

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")

Toggle

Toggle("Wi-Fi", isOn: true)

role toggle · arguments label

Label
Source
Toggle("Label")

ToolbarItem

ToolbarItem(placement: .topBarTrailing) { … }

role toolbaritem

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

ToolbarItemGroup

role toolbaritem

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

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") }

VideoPlayer

poster image, progress: 0…1, time:, duration:, playing:

role media · arguments image

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

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") }