Macintosh (System 6)¶
Imitates: Classic Macintosh system software, System 1 – System 6 (1984 – 1991), 1-bit System 6.0.8 · Pack id: mac-classic · Selected by: pack="mac-classic", import MacClassic, import System6, import Macintosh · Default device: desktop (none chrome)
45 own elements, plus 125 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 alert box; severity: .stop / .note / .caution draws the icon
role dialog · arguments message · defaults severity: "note", variant: "alert" · variants alert
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Alert("Message") { Text("Content"); Button("Action") }.variant("alert"); Text("alert").font(.caption).foregroundStyle(.secondary) }
}AppleMenu¶
The leftmost menu, titled with a neutral apple-ish glyph; holds desk accessories
role menu · defaults caret: False, kind: "apple", label: " "
Source
AppleMenu() { Button("Open"); Button("Save"); Divider(); Button("Close") }Button¶
Push button: a round-cornered rectangle; .variant(.default) adds the thick outline
role button · arguments label · variants standard, default
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Button("Label").variant("standard"); Text("standard").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Button("Label").variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
}CalcKey¶
A calculator key
role button · arguments label · defaults variant: "key"
Source
CalcKey("Label")CautionAlert¶
Alert with the caution icon (a triangle with !)
role dialog · arguments message · defaults severity: "caution", variant: "alert"
Source
CautionAlert("Message") { Text("Content"); Button("Action") }CheckBox¶
Check box: a square crossed with an X when on
role checkbox · arguments label, checked
Source
CheckBox("Label", true)DefaultButton¶
The default push button (3-pixel rounded outline; Return activates it)
role button · arguments label · defaults variant: "default"
Source
DefaultButton("Label")DeskAccessory¶
A small desk-accessory window (Calculator, Note Pad, Alarm Clock …)
role card · arguments title · defaults kind: "da", variant: "noGrow"
Source
DeskAccessory("Title") { Text("Content"); Button("Action") }Desktop¶
The desktop: the patterned area below the menu bar; place windows and icons with .offset(x:y:)
role zstack · defaults alignment: "topLeading"
Source
Desktop() { Text("Content"); Button("Action") }DesktopIcon¶
A 32×32 1-bit icon with its name below; kind: .folder/.document/.application/.disk/.floppy/.trash/.system
role label · arguments title, kind · defaults kind: "document" · variants folder, document, application, disk, floppy, trash, system, stationery, clipboard, calculator, preferences, profile, printer, openFolder
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { DesktopIcon("Title").variant("folder"); Text("folder").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { DesktopIcon("Title").variant("document"); Text("document").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { DesktopIcon("Title").variant("application"); Text("application").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { DesktopIcon("Title").variant("disk"); Text("disk").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { DesktopIcon("Title").variant("floppy"); Text("floppy").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { DesktopIcon("Title").variant("trash"); Text("trash").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { DesktopIcon("Title").variant("system"); Text("system").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { DesktopIcon("Title").variant("stationery"); Text("stationery").font(.caption).foregroundStyle(.secondary) }
}Dialog¶
A modal dialog (dBoxProc) presented over the screen; actions: { Button … }
role dialog · arguments title
Source
Dialog("Title") { Text("Content"); Button("Action") }DialogWindow¶
An in-place modal dialog box (dBoxProc double border), drawn where it stands
role card · defaults variant: "dBox"
Source
DialogWindow() { Text("Content"); Button("Action") }DocumentWindow¶
documentProc window with stripes, close box, zoom box, scroll bars, grow box
role card · arguments title · defaults variant: "document"
Source
DocumentWindow("Title") { Text("Content"); Button("Action") }EditText¶
Editable text item of a dialog: a framed box
role textfield · arguments text
Source
EditText("Text")FileItem¶
A row of a ListBox: FileItem("Letters", kind: .folder); .selected() inverts it
role listitem · arguments title, kind
Source
FileItem("Title")FinderIcon¶
An icon in a Finder window's icon view
role label · arguments title, kind · defaults kind: "document" · variants folder, document, application, disk, floppy, trash, system, stationery, clipboard, calculator, preferences, profile, printer, openFolder
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { FinderIcon("Title").variant("folder"); Text("folder").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FinderIcon("Title").variant("document"); Text("document").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FinderIcon("Title").variant("application"); Text("application").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FinderIcon("Title").variant("disk"); Text("disk").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FinderIcon("Title").variant("floppy"); Text("floppy").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FinderIcon("Title").variant("trash"); Text("trash").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FinderIcon("Title").variant("system"); Text("system").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FinderIcon("Title").variant("stationery"); Text("stationery").font(.caption).foregroundStyle(.secondary) }
}FinderWindow¶
A Finder window in icon view: FinderWindow("Disk", subtitle: "5 items …")
role card · arguments title, subtitle · defaults variant: "finder"
Source
FinderWindow("Title", "Subtitle") { Text("Content"); Button("Action") }GrowBox¶
The size box drawn where the two scroll bars meet
role color
Source
GrowBox().frame(width: 160, height: 96)LineWidths¶
The line-width chooser of a paint program
role vstack · defaults spacing: 0
Source
LineWidths() { Text("Content"); Button("Action") }ListBox¶
List Manager list (Standard File's file list) with a scroll bar
role list · defaults kind: "files"
Source
ListBox() { Text("First item"); Text("Second item") }Menu¶
A menu-bar title; Menu("File", open: true) { MenuItem(…) } pulls its menu down
role menu · arguments label · defaults caret: False
Source
Menu("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }MenuBar¶
The menu bar across the top of the screen; holds Menu elements (one may be open: true)
role toolbar
Source
MenuBar() { Button("Save"); Button("Share") }MenuItem¶
A menu command: MenuItem("Quit", shortcut: "⌘Q"); .disabled() greys it
role menuitem · arguments label, shortcut
Source
MenuItem("Label", "⌘S")ModalDialog¶
Same as Dialog
role dialog · arguments title
Source
ModalDialog("Title") { Text("Content"); Button("Action") }NoGrowWindow¶
noGrowDocProc window: striped title bar, no scroll bars
role card · arguments title · defaults variant: "noGrow"
Source
NoGrowWindow("Title") { Text("Content"); Button("Action") }NoteAlert¶
Alert with the note icon (a talking face)
role dialog · arguments message · defaults severity: "note", variant: "alert"
Source
NoteAlert("Message") { Text("Content"); Button("Action") }PaintCanvas¶
The white drawing area of a paint window
role canvas
Source
PaintCanvas() { Text("Content"); Button("Action") }.frame(width: 160, height: 96)PatternPalette¶
The row of fill patterns under a paint program's canvas; selection: index
role swatches · arguments colors · defaults colors: ["white", "black", "gray", "gray", "gray", "gray", "gray", "gray", "gray", "gray", "gray", "gray"]
Source
PatternPalette()PopUpMenu¶
Pop-up menu: framed with a drop shadow and a down triangle
role select · arguments label
Source
PopUpMenu("Label")ProgressBar¶
A plain progress bar: framed and filled black
role progress · arguments value
Source
ProgressBar(60)PushButton¶
Push button
role button · arguments label · variants standard, default
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { PushButton("Label").variant("standard"); Text("standard").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { PushButton("Label").variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
}RadioButton¶
Radio button: a circle with a dot when on
role radio · arguments label, checked
Source
RadioButton("Label", true)RadioGroup¶
Radio buttons from items: […], selection: …
role radiogroup · arguments label
Source
RadioGroup("Label")RoundWindow¶
rDocProc window: rounded corners and a black title bar (Calculator style)
role card · arguments title · defaults variant: "rDoc"
Source
RoundWindow("Title") { Text("Content"); Button("Action") }ScrollBar¶
A scroll bar: ScrollBar(.vertical / .horizontal, position: .top/.middle/.bottom); .variant(.inactive) for an inactive window
role divider · arguments orientation · defaults orientation: "vertical" · variants active, inactive
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { ScrollBar().variant("active"); Text("active").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { ScrollBar().variant("inactive"); Text("inactive").font(.caption).foregroundStyle(.secondary) }
}Spreadsheet¶
A worksheet grid (rows: [[…]], selection: "B2")
role spreadsheet
| A | B | |
|---|---|---|
| 1 | A | B |
| 2 | 1 | 2 |
| 3 | 3 | 4 |
Source
Spreadsheet(columns: ["A", "B"], rows: [[1, 2], [3, 4]])StaticText¶
Static text item of a dialog
role text · arguments content
Source
StaticText("Content")StopAlert¶
Alert with the stop icon (an octagon with a raised hand)
role dialog · arguments message · defaults severity: "stop", variant: "alert"
Source
StopAlert("Message") { Text("Content"); Button("Action") }TextEdit¶
TextEdit field (multi-line with kind: .multiline)
role textfield · arguments text
Source
TextEdit("Text")Tool¶
A palette tool drawn as a 1-bit glyph: Tool(.pencil); .selected() inverts it
role button · arguments kind · defaults iconOnly: True · variants select, lasso, hand, text, bucket, spray, brush, pencil, line, eraser, rect, filledRect, roundRect, filledRoundRect, oval, filledOval, arc, polygon, freehand, grid
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Tool().variant("select"); Text("select").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Tool().variant("lasso"); Text("lasso").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Tool().variant("hand"); Text("hand").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Tool().variant("text"); Text("text").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Tool().variant("bucket"); Text("bucket").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Tool().variant("spray"); Text("spray").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Tool().variant("brush"); Text("brush").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Tool().variant("pencil"); Text("pencil").font(.caption).foregroundStyle(.secondary) }
}ToolPalette¶
A drawing program's tool palette (two columns of tools)
role grid · defaults columns: 2
Source
ToolPalette() { Text("Content"); Button("Action") }Window¶
A window: .document (title bar, scroll bars, grow box), .noGrow, .dBox, .plainDBox, .altDBox, .rDoc (rounded desk accessory), .finder
role card · arguments title · defaults variant: "document" · variants document, noGrow, zoom, dBox, plainDBox, altDBox, rDoc, finder
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("noGrow"); Text("noGrow").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("zoom"); Text("zoom").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("dBox"); Text("dBox").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("plainDBox"); Text("plainDBox").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("altDBox"); Text("altDBox").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("rDoc"); Text("rDoc").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("finder"); Text("finder").font(.caption).foregroundStyle(.secondary) }
}Core vocabulary in this style¶
Accordion¶
role accordion · arguments title
Source
Accordion("Title") { Text("Content"); Button("Action") }Board¶
Kanban board of BoardColumn children
role board
Source
Board() { BoardColumn("To do") { KanbanCard("Write copy") } }BoardColumn¶
BoardColumn("To do", count:, color:) { KanbanCard(…) }
role boardcolumn · arguments title
Source
BoardColumn("Title") { KanbanCard("Write copy"); KanbanCard("Review") }Calendar¶
role calendar
Source
Calendar()Callout¶
a numbered annotation; place with .position(x:y:)
role callout · arguments number, text
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
Source
Canvas() { Text("Content"); Button("Action") }.frame(width: 160, height: 96)Card¶
role card · arguments title
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])CodeBlock¶
role code · arguments code · defaults lineNumbers: False
Source
CodeBlock("let total = items.count")CodeEditor¶
CodeEditor("…", language: "swift", lineNumbers:, highlight: [3], tabs: [..])
role code · arguments code
Source
CodeEditor("let total = items.count")Comment¶
author:, time:, avatar:
role message · arguments text · defaults variant: "comment"
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
Source
DisclosureGroup("Title") { Text("Content"); Button("Action") }EmptyState¶
title, systemImage:, description: { actions }
role emptystate · arguments title
Source
EmptyState("Title")Form¶
role form
Source
Form() { TextField("Name"); Toggle("Notifications", isOn: true) }Gantt¶
scale: ["W1",…], tasks: [("Design", 0, 2, 0.6), …], today:
role gantt
Source
Gantt(tasks: [("Design", 0, 3), ("Build", 2, 5)])Grid¶
Grid of GridRow children, or columns: n
role grid
Source
Grid() { Text("Content"); Button("Action") }GroupBox¶
role card · arguments title
Source
GroupBox("Title") { Text("Content"); Button("Action") }HStack¶
Horizontal stack. spacing:, alignment: .top|.center|.bottom
role hstack
Source
HStack() { Text("Content"); Button("Action") }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
Source
KanbanCard("Title")LabeledContent¶
role labeled · arguments label, value
Source
LabeledContent("Label", "Value") { Text("Content"); Button("Action") }LazyVGrid¶
columns: [GridItem(.flexible()), …] or a count
role grid
Source
LazyVGrid() { Text("Content"); Button("Action") }List¶
.listStyle(.insetGrouped|.plain|.sidebar|…)
role list
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
Source
MessageBubble("Text")NavigationLink¶
role listitem · arguments title · defaults chevron: True
Source
NavigationLink("Title")NavigationSplitView¶
{ sidebar } content: { … } detail: { … }
role split
Source
NavigationSplitView() { Text("Content"); Button("Action") }NavigationStack¶
Content's .navigationTitle / .toolbar form the bar
role navstack
Source
NavigationStack() { Text("Content"); Button("Action") }Picker¶
Picker("Size", selection: "M") { Text("S") … }
role select · arguments label
Source
Picker("Label")Placeholder¶
A labelled box for maps, charts, media
role placeholder · arguments 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
Source
ProgressView("Label")RoundedRectangle¶
role shape · defaults shape: "rounded"
Source
RoundedRectangle().frame(width: 160, height: 96)Row¶
title, subtitle:, detail:, systemImage:, chevron:
role listitem · arguments title
Source
Row("Title")Schedule¶
days: [..], startHour:, endHour:, events: [("Standup", "Mon", 9, 9.5, .blue)], now:
role schedule
Source
Schedule()ScrollView¶
role scroll · arguments axes
Source
ScrollView() { Text("Content"); Button("Action") }SearchField¶
role textfield · arguments placeholder · defaults kind: "search"
Source
SearchField("Placeholder")Section¶
Section("Header") { … } footer: { … }
role section · arguments title
Source
Section("Title") { Text("First item"); Text("Second item") }SecureField¶
role textfield · arguments placeholder · defaults kind: "password"
Source
SecureField("Placeholder")SegmentedControl¶
role segmented · arguments items
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") }Sidebar¶
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)Sparkline¶
role chart · arguments values · defaults kind: "sparkline"
Source
Sparkline([3, 5, 2, 6, 4], values: [3, 5, 2, 6, 4])Stat¶
Stat("Revenue", "$48k", change: "+12%", trend: [..], systemImage:)
role stat · arguments label, value
Source
Stat("Label", 60)Steps¶
role steps · arguments steps
Source
Steps(["Cart", "Shipping", "Payment"])StickyNote¶
StickyNote("Call Ana", color: .yellow, rotation: -2, author:)
role stickynote · arguments text
Source
StickyNote("Text")TabView¶
Children with .tabItem { Label } or Tab(…)
role tabs · defaults placement: "bottom"
Source
TabView() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }Table¶
columns: ["Name", …], rows: [[…], …] or TableRow children
role table
| Name | Status |
|---|---|
| Ana Lima | Active |
| Ben Okafor | Away |
Source
Table(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])Tabs¶
role tabs · arguments items · defaults placement: "top"
Source
Tabs(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }Terminal¶
lines starting with "$ " are commands
role code · arguments code · defaults variant: "terminal"
Source
Terminal("let total = items.count")Text¶
Text with bold, italic, code Markdown
role text · arguments content
Source
Text("Content")TextEditor¶
role textfield · arguments text · defaults kind: "multiline"
Source
TextEditor("Text")Timeline¶
role timeline
Source
Timeline() { TimelineItem("Created"); TimelineItem("Shipped") }TimelineItem¶
title, time:, description:, systemImage:, status:
role timelineitem · arguments title
Source
TimelineItem("Title")ToolbarItem¶
ToolbarItem(placement: .topBarTrailing) { … }
role toolbaritem
Source
ToolbarItem() { Text("Content"); Button("Action") }ToolbarItemGroup¶
role toolbaritem
Source
ToolbarItemGroup() { Text("Content"); Button("Action") }Tooltip¶
role tooltip · arguments text
Source
Tooltip("Text") { Text("Content"); Button("Action") }Tree¶
Tree { TreeItem("src") { TreeItem("main.swift") } }
role tree
Source
Tree() { TreeItem("Folder") { TreeItem("File") } }TreeItem¶
label, systemImage:, folder:, expanded:, selected:, detail:
role treeitem · arguments label
Source
TreeItem("Label")VStack¶
Vertical stack. spacing:, alignment: .leading|.center|.trailing
role vstack
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"
Source
Whiteboard() { Text("Content"); Button("Action") }.frame(width: 160, height: 96)ZStack¶
Overlapping layers. alignment:
role zstack
Source
ZStack() { Text("Content"); Button("Action") }