Skip to content

Mac OS X Aqua (2001)

Imitates: Mac OS X Aqua, early era (10.0 Cheetah – 10.2 Jaguar, Cocoa / Carbon) Mac OS X 10.2 · Pack id: aqua · Selected by: pack="aqua", import Aqua, import MacOSX, import Cheetah, import Jaguar · Default device: desktop (window chrome)

73 own elements, plus 116 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

An application-modal alert: application icon at the left, bold message, small informative text, buttons at the right with the pulsing default button

role dialog · arguments title · defaults icon: "app", variant: "alert"

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

AlertSheet

An alert presented as a sheet (NSBeginAlertSheet): icon, message and buttons sliding from the title bar

role dialog · arguments title · defaults icon: "app", variant: "sheet"

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

AppMenu

The application menu: the frontmost application's name in bold

role menu · arguments label · defaults caret: False

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

ApplicationIcon

An application icon: a glossy tile in the colour given by color:

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

Title
Source
ApplicationIcon("Title")

BevelButton

A square bevel button (NSRegularSquareBezelStyle) for icons and image wells

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

Label
Source
BevelButton("Label")

Box

A group box: title above a sunken, slightly darker rounded box

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

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

Browser

The column browser (NSBrowser), as in the Finder's column view: BrowserColumn children

role hstack

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

BrowserCell

A folder cell of a Browser column: icon, name and the black triangle at the right

role listitem · arguments title · defaults chevron: True, icon: "folder"

Title
Source
BrowserCell("Title")

BrowserColumn

One column of a Browser: BrowserCell (folders, with the triangle) and FileCell rows

role list

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

Button

A push button: the clear gel lozenge. .variant(.default) is the pulsing blue default button

role button · arguments label · defaults variant: "push" · variants push, default, bevel, round, help, metal, toolbar, recessed

Labelpush
Labeldefault
Labelbevel
Labelround
Labelhelp
Labelmetal
Labeltoolbar
Labelrecessed
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) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("round"); Text("round").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("help"); Text("help").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("metal"); Text("metal").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("toolbar"); Text("toolbar").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("recessed"); Text("recessed").font(.caption).foregroundStyle(.secondary) }
}

CheckBox

An Aqua check box: clear gel square, blue gel with the check mark when on; checked: true | .mixed

role checkbox · arguments label

Label
Source
CheckBox("Label")

ColorWell

A row of colour wells / the Colors panel swatches

role swatches

Source
ColorWell()

ComboBox

A combo box: a text field with a blue gel arrow button at the right

role select · arguments label · defaults kind: "combo"

Source
ComboBox("Label")

ContextMenu

A contextual menu drawn open in place: ContextMenu { MenuItem(…) }

role menu

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

DefaultButton

The default button: blue gel, slowly pulsing; Return activates it

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

Label
Source
DefaultButton("Label")

Desktop

The Aqua desktop (blue wave). Put a MenuBar first, then windows, icons and the Dock placed with .position(x:y:)

role canvas

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

DiskIcon

A hard disk icon

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

Title
Source
DiskIcon("Title")

Dock

The Dock: a translucent shelf of DockItem icons with a DockSeparator before the Trash

role toolbar

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

DockItem

An icon in the Dock: DockItem("Mail", icon: "envelope", color: .blue); .running() adds the black triangle, .highlighted() shows the name above

role button · arguments label · defaults iconOnly: True, variant: "dock"

Label
Source
DockItem("Label")

DockSeparator

The separator between applications and documents/Trash in the Dock

role divider

Source
DockSeparator()

DocumentIcon

A document icon with the folded corner

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

Title
Source
DocumentIcon("Title")

DocumentWindow

A document window (pinstriped, white content area)

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

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

Drawer

A drawer sliding out of a window side (side: .trailing default, .leading); put it next to the Window in an HStack(spacing: 0)

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

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

FileCell

A file cell of a Browser column (no triangle)

role listitem · arguments title · defaults icon: "doc"

Title
Source
FileCell("Title")

FinderIcon

A Finder / desktop icon with its name below; icon: any icon name

role label · arguments title · defaults kind: "generic"

Title
Source
FinderIcon("Title")

FolderIcon

A translucent blue Aqua folder

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

Title
Source
FolderIcon("Title")

HelpButton

The round help button with the question mark

role button · defaults label: "?", variant: "help"

?
Source
HelpButton()

InfoBar

The Finder window status text under the toolbar: InfoBar("6 items", "2.4 GB available")

role labeled · arguments label, value

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

LevelIndicator

A capacity indicator (as in the Finder's disk info)

role progress · arguments label

Label
Source
LevelIndicator("Label")

ListItem

A list row

role listitem · arguments title

Title
Source
ListItem("Title")

ListView

A white list (single-column table) with blue selection

role list

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

Matrix

NSMatrix of radio buttons (Interface Builder name)

role radiogroup · arguments label

Label
Source
Matrix("Label")

A menu; with no label it is a standalone (open) translucent menu

role menu · arguments label

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

The translucent menu bar: SystemMenu(), AppMenu("Finder"), MenuTitle("File") …, Spacer(), MenuExtra/Text(clock)

role toolbar

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

A menu extra (status item) at the right of the menu bar: MenuExtra(icon: "speaker") or MenuExtra("Mon 9:41 AM")

role label · arguments title

Title
Source
MenuExtra("Title")

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

role menuitem · arguments label

Source
MenuItem("Label")

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

role menu · arguments label · defaults caret: False

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

MetalWindow

A brushed-metal (textured) window, as in the media and camera applications

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

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

OutlineItem

A row of an OutlineView

role treeitem · arguments title

Title
Source
OutlineItem("Title")

OutlineView

An outline view with disclosure triangles

role tree

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

Panel

A utility panel (Fonts, Colors, Inspector): small title bar and small gel buttons

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

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

PopUpButton

A pop-up button: clear gel lozenge with the blue cap holding the double arrows; items:, selection:, open:

role select · arguments label

Source
PopUpButton("Label")

PreferenceIcon

A System Preferences pane icon: glossy tile (color:) with the glyph and its name below

role label · arguments title · defaults kind: "pref"

Title
Source
PreferenceIcon("Title")

ProgressBar

Alias of ProgressIndicator

role progress · arguments label

Label
Source
ProgressBar("Label")

ProgressIndicator

The Aqua progress bar: blue gel with moving barber stripes; no value: the indeterminate blue-and-white pole

role progress · arguments label

Label
Source
ProgressIndicator("Label")

PullDownButton

A pull-down button: a gel lozenge with a single down arrow; open: true shows its menu

role menu · arguments label · defaults variant: "pulldown"

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

PushButton

A push button (NSRoundedBezelStyle)

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

Label
Source
PushButton("Label")

RadioButton

An Aqua radio button: clear gel bead, blue with a dark dot when selected

role radio · arguments label

Label
Source
RadioButton("Label")

RadioGroup

A radio matrix: RadioGroup("Show:", items: [...], selection:)

role radiogroup · arguments label

Label
Source
RadioGroup("Label")

RoundButton

A round gel button (NSCircularBezelStyle); on a MetalWindow the transport buttons of a media player

role button · arguments icon · defaults variant: "round"

Source
RoundButton("star")

ScrollView

A scroll view with Aqua scroll bars: blue gel thumb, both arrows together at the bottom

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

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

SearchField

A search field (rounded, with the magnifying glass)

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

Placeholder
Source
SearchField("Placeholder")

SecureTextField

A secure text field (bullets)

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

Placeholder
Source
SecureTextField("Placeholder")

SegmentedControl

A gel segmented control (items:, selection:)

role segmented · arguments label

Label
Source
SegmentedControl("Label")

Separator

A separator line (NSBox separator)

role divider

Source
Separator()

Sheet

A document-modal sheet sliding down from the title bar of the window drawn by the window chrome; buttons: [...], primary:

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

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

Slider

An Aqua slider: thin gel track and the blue gel knob (pointed when ticks: is set)

role slider · arguments label

Label
Source
Slider("Label")

Spinner

The spinning (asynchronous) progress indicator with twelve grey spokes

role progress · defaults kind: "circular"

Source
Spinner()

StatusDisplay

The LCD-style status display of a brushed-metal media application: title, subtitle and a progress

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

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

Stepper

The little arrows (NSStepper) beside a number field

role stepper · arguments label

Label
Source
Stepper("Label")

StickyNote

A Stickies note

role stickynote · arguments text

Text
Source
StickyNote("Text")

SystemMenu

The system menu at the far left of the menu bar (drawn as a neutral blue gel orb); open: true shows its items

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

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

TabView

An Aqua tab view: gel tab segments centred on the top edge of a sunken box; TabViewItem("General") { … } children

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

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

TabViewItem

One tab of a TabView

role tab · arguments label

Source
TabViewItem("Label")

TableView

A table view: gel column headers (the sorted one in blue), alternating blue-white rows when variant: .alternating; columns:, rows:, sortColumn:, selectedRows:

role table · variants plain, alternating

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

Terminal

A Terminal window (black on white, Monaco)

role code · defaults variant: "terminal"

Terminal
Source
Terminal()

TextField

A text field with the inset frame; .state(.focused) draws the blue focus ring

role textfield · arguments placeholder

Placeholder
Source
TextField("Placeholder")

TextView

A multi-line text view in an inset frame

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

Placeholder
Source
TextView("Placeholder")

ToolTip

A help tag: pale yellow tooltip

role tooltip · arguments text

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

Toolbar

A window toolbar (NSToolbar): ToolbarButton items with large icons and labels below; the white toolbar toggle lozenge is drawn at the top right

role toolbar

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

ToolbarButton

A toolbar item: ToolbarButton("Home", icon: "house")

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

Label
Source
ToolbarButton("Label")

UtilityWindow

A utility window (NSPanel with the utility style)

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

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

Window

An Aqua window: pinstriped body, title bar with the red/yellow/green gel buttons. .inactive() greys the buttons and title

role card · arguments title · defaults variant: "document" · variants document, metal, utility, plain

Title
ContentAction
document
Title
ContentAction
metal
Title
ContentAction
utility
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("metal"); Text("metal").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("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")

Dialog

role dialog · arguments title

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

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

GroupBox

role card · arguments title

Title
ContentAction
Source
GroupBox("Title") { 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)

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

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

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

Tab

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

role tab · arguments label

Source
Tab("Label")

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

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

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