GS/OS (Apple IIgs)¶
Imitates: Apple IIgs GS/OS System 6 Finder (super hi-res 640 mode, 1988–1993) System 6.0.1 · Pack id: gsos · Selected by: pack="gsos", import GSOS, import AppleIIgs, import IIgs · Default device: desktop (window chrome)
38 own elements, plus 124 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: double frame, Stop / Note / Caution icon (severity: .stop | .note | .caution), buttons:, primary:
role dialog · arguments title · defaults icon: "exclamationmark.triangle", severity: "caution", variant: "alert"
Source
Alert("Title") { Text("Content"); Button("Action") }AppleMenu¶
The Apple menu at the left (a neutral colour glyph, not the logo); open: true shows the desk accessories
role menu · defaults caret: False, icon: "circle"
Source
AppleMenu() { Button("Open"); Button("Save"); Divider(); Button("Close") }ApplicationIcon¶
An application (S16) icon
role label · arguments title · defaults icon: "app", kind: "application"
Source
ApplicationIcon("Title")Button¶
A rounded push button; .variant(.default) (or DefaultButton) draws the bold outline
role button · arguments label · variants push, default
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) }
}CheckBox¶
A check box (checked shows an X)
role checkbox · arguments label
Source
CheckBox("Label")ControlPanel¶
The Control Panel NDA window: a CDev list at the left, the selected CDev at the right
role card · arguments title · defaults title: "Control Panel", variant: "nda"
Source
ControlPanel() { Text("Content"); Button("Action") }DefaultButton¶
The default button (Return activates it)
role button · arguments label · defaults variant: "default"
Source
DefaultButton("Label")Desktop¶
The Finder desktop (dithered pattern). Put a MenuBar first, then place windows and icons with .position(x:y:)
role canvas
Source
Desktop() { Text("Content"); Button("Action") }.frame(width: 160, height: 96)Dialog¶
A centred modal dialog with the double frame
role dialog · arguments title · defaults variant: "modal"
Source
Dialog("Title") { Text("Content"); Button("Action") }Disk¶
A 3.5-inch disk icon
role label · arguments title · defaults icon: "archivebox", kind: "floppy"
Source
Disk("Title")DocumentIcon¶
A document icon
role label · arguments title · defaults icon: "doc", kind: "document"
Source
DocumentIcon("Title")FinderIcon¶
A Finder icon with its name below; icon: any icon name; .selected() inverts it
role label · arguments title
Source
FinderIcon("Title")FinderList¶
Finder list view: columns:, TableRow children, sortColumn: (underlined), selectedRows:
role table
| Name | Status |
|---|---|
| Ana Lima | Active |
| Ben Okafor | Away |
Source
FinderList(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])FinderWindow¶
A Finder window; an InfoBar then icons or a list inside a ScrollArea
role card · arguments title · defaults variant: "document"
Source
FinderWindow("Title") { Text("Content"); Button("Action") }Folder¶
A folder icon
role label · arguments title · defaults icon: "folder", kind: "folder"
Source
Folder("Title")Frame¶
A plain rectangle grouping controls (static text title on top)
role card · arguments title · defaults variant: "group"
Source
Frame("Title") { Text("Content"); Button("Action") }HardDisk¶
A hard disk (SCSI or /RAM5) icon
role label · arguments title · defaults icon: "archivebox", kind: "harddisk"
Source
HardDisk("Title")InfoBar¶
The Finder window info bar: InfoBar("9 items", "312K available")
role labeled · arguments label, value
Source
InfoBar("Label", "Value") { Text("Content"); Button("Action") }LineEdit¶
A LineEdit text field
role textfield · arguments placeholder
Source
LineEdit("Placeholder")ListControl¶
A List Manager list: framed, the selected rows inverted
role list
Source
ListControl() { Text("First item"); Text("Second item") }MenuBar¶
The menu bar: AppleMenu(), MenuTitle("File") …, Spacer(), Text(…)
role toolbar
Source
MenuBar() { Button("Save"); Button("Share") }MenuItem¶
A menu item; shortcut: "⌘O" (the open-apple key), checked:, .disabled(), .highlighted()
role menuitem · arguments label
Source
MenuItem("Label")MenuTitle¶
A menu bar title; MenuTitle("File", open: true) { MenuItem(…) }
role menu · arguments label · defaults caret: False
Source
MenuTitle("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }ModalDialog¶
A modal dialog drawn in place (double frame, no title bar)
role card · arguments title · defaults variant: "dialog"
Source
ModalDialog("Title") { Text("Content"); Button("Action") }NDAWindow¶
A New Desk Accessory window (Control Panel, Calculator …)
role card · arguments title · defaults variant: "nda"
Source
NDAWindow("Title") { Text("Content"); Button("Action") }PopupMenu¶
A pop-up menu with its title at the left and a drop shadow
role select · arguments label
Source
PopupMenu("Label")ProgressBar¶
A thermometer progress bar; value: 0…1
role progress · arguments label
Source
ProgressBar("Label")RadioGroup¶
RadioGroup("Speed:", items: […], selection:)
role radiogroup · arguments label
Source
RadioGroup("Label")ScrollArea¶
A content area with GS/OS scroll bars (dithered track, arrows at each end) and the grow box
role scroll · defaults variant: "both" · variants both, vertical, horizontal, 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) }
}TextEdit¶
A multi-line TextEdit box
role textfield · arguments text · defaults kind: "multiline"
Source
TextEdit("Text")TextField¶
A LineEdit text field
role textfield · arguments placeholder
Source
TextField("Placeholder")TrashIcon¶
The Trash
role label · arguments title · defaults icon: "trash", kind: "trash", title: "Trash"
Source
TrashIcon()Window¶
A GS/OS window: lined title bar, close box at the left, zoom box at the right
role card · arguments title · defaults variant: "document" · variants document, nda, dialog, alert, 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("nda"); Text("nda").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("alert"); Text("alert").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
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)Menu¶
role menu · arguments 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
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])Spreadsheet¶
rows: [[…]], selection: "B2:C4", active:, formula:, sheets: [..], highlight: ["B3": .yellow]
role spreadsheet
| A | B | |
|---|---|---|
| 1 | A | B |
| 2 | 1 | 2 |
| 3 | 3 | 4 |
Source
Spreadsheet(columns: ["A", "B"], rows: [[1, 2], [3, 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"])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") }