NLS (oN-Line System)¶
Imitates: oN-Line System, SRI Augmentation Research Center — as shown at the Fall Joint Computer Conference, 9 December 1968 NLS on the SDS 940, 1968 · Pack id: nls · Selected by: pack="nls", import NLS, import OnLineSystem, import ARC · Default device: desktop (none chrome)
30 own elements, plus 134 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¶
Bug¶
The tracking spot moved by the mouse: a short upward arrow · use inline in a statement, or .position(x:y:) in a ZStack/Drawing
role pointer · defaults kind: "bug"
Source
Bug()Caption¶
Dim fine print
role text · arguments content · defaults font: "caption"
Source
Caption("Content")Chord¶
A five-key keyset chord as typed (keys pressed together): Chord(["·","█","·","█","·"]) or Chord("d")
role kbd · arguments keys
Source
Chord(["⌘", "K"])CommandButton¶
A command word set in brackets — there were no on-screen buttons; this stands for a keyset command: CommandButton("JUMP")
role button · arguments label
Source
CommandButton("Label")CommandFeedback¶
Alias of FeedbackLine
role toolbar · arguments title
Source
CommandFeedback("Title") { Button("Save"); Button("Share") }CommandWord¶
One command word (verb or noun) as shown in the feedback line: CommandWord("JUMP")
role text · arguments content · defaults variant: "command"
Source
CommandWord("Content")Display¶
The whole CRT display as the TV camera saw it: Display(file: "
role card · arguments title
Source
Display("Title") { Text("Content"); Button("Action") }DisplayArea¶
One display area (window) of a split screen, its file address in the top rule: DisplayArea("
role card · arguments title · defaults variant: "area" · variants area, bare
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { DisplayArea("Title") { Text("Content"); Button("Action") }.variant("area"); Text("area").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { DisplayArea("Title") { Text("Content"); Button("Action") }.variant("bare"); Text("bare").font(.caption).foregroundStyle(.secondary) }
}Drawing¶
A vector drawing area; place Strokes, Nodes and labels with .position(x:y:)
role canvas
Source
Drawing() { Text("Content"); Button("Action") }.frame(width: 160, height: 96)Echo¶
Characters echoed as they are typed on the keyset, ending in the underline cursor: Echo("2b")
role text · arguments content · defaults variant: "echo"
Source
Echo("Content")FeedbackLine¶
The command feedback line at the top of the screen: the command being composed, then the echo: FeedbackLine("INSERT STATEMENT") { Echo("fresh bread") }
role toolbar · arguments title
Source
FeedbackLine("Title") { Button("Save"); Button("Share") }FileLink¶
A link to a statement in another file, shown in parentheses: FileLink("ARC, PLAN, 3a") → (ARC, PLAN, 3a)
role link · arguments label · defaults variant: "file" · variants statement, file
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { FileLink("Label").variant("statement"); Text("statement").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FileLink("Label").variant("file"); Text("file").font(.caption).foregroundStyle(.secondary) }
}Heading¶
A larger line of text
role text · arguments content · defaults font: "title3"
Source
Heading("Content")Marker¶
A named marker set on a character, shown as a small tag: Marker("m")
role text · arguments content · defaults variant: "marker"
Source
Marker("Content")Node¶
A boxed label in a diagram: Node("library")
role text · arguments content · defaults variant: "node"
Source
Node("Content")Outline¶
Alias of StatementFile
role tree
Source
Outline() { TreeItem("Folder") { TreeItem("File") } }PartnerBug¶
A second user's tracking spot on a shared screen, drawn hollow
role pointer · defaults kind: "partner"
Source
PartnerBug()Register¶
A name register or status slot at the edge of the feedback line: Register("BUG 2c")
role text · arguments content · defaults variant: "register"
Source
Register("Content")RouteMap¶
A line-drawn map with stops and the route between them: RouteMap(pins: [(20, 30, "library")], route: true)
role map
Source
RouteMap().frame(width: 160, height: 96)Rule¶
A drawn horizontal line; Rule("label") sets text into it
role divider · arguments label
Source
Rule("Label")Screen¶
Alias of Display
role card · arguments title
Source
Screen("Title") { Text("Content"); Button("Action") }SplitScreen¶
Display areas side by side (or stacked with orientation: .vertical), split by a single drawn line
role split
Source
SplitScreen() { Text("Content"); Button("Action") }Statement¶
One statement; nest Statements for sub-statements. number: "3b" overrides the automatic number · .selected() intensifies it
role treeitem · arguments label
Source
Statement("Label")StatementFile¶
A structured file of hierarchical statements, numbered 1, 1a, 1a1 … automatically · view specs: levels: 1…4, lines: 1 (first line only), numbers: false
role tree
Source
StatementFile() { TreeItem("Folder") { TreeItem("File") } }StatementLink¶
A link to another statement, shown in parentheses: StatementLink("2b") → (2b)
role link · arguments label · defaults variant: "statement" · variants statement, file
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { StatementLink("Label").variant("statement"); Text("statement").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { StatementLink("Label").variant("file"); Text("file").font(.caption).foregroundStyle(.secondary) }
}Stroke¶
A drawn vector line: Stroke().frame(width: 120, height: 2).rotationEffect(.degrees(30)).position(x:y:)
role shape · defaults variant: "line" · variants line, dashed
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Stroke().variant("line").frame(width: 160, height: 96); Text("line").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Stroke().variant("dashed").frame(width: 160, height: 96); Text("dashed").font(.caption).foregroundStyle(.secondary) }
}SystemMessage¶
A short system reply in the feedback area, set in inverse: SystemMessage("FILE LOADED")
role text · arguments content · defaults variant: "message"
Source
SystemMessage("Content")VideoInset¶
The television picture of a person mixed into the display: VideoInset("camera 2 — remote site") · .variant(.overlay) superimposes it translucently
role placeholder · arguments label · defaults variant: "inset" · variants inset, overlay
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { VideoInset("Label").variant("inset").frame(width: 160, height: 96); Text("inset").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { VideoInset("Label").variant("overlay").frame(width: 160, height: 96); Text("overlay").font(.caption).foregroundStyle(.secondary) }
}ViewSpec¶
The current view-specification letters, shown dim: ViewSpec("abm")
role text · arguments content · defaults variant: "viewspec"
Source
ViewSpec("Content")Window¶
Alias of DisplayArea
role card · arguments title · defaults variant: "area" · variants area, bare
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("area"); Text("area").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Window("Title") { Text("Content"); Button("Action") }.variant("bare"); Text("bare").font(.caption).foregroundStyle(.secondary) }
}Core vocabulary in this style¶
Accordion¶
role accordion · arguments title
Source
Accordion("Title") { Text("Content"); Button("Action") }Alert¶
role dialog · arguments title · defaults variant: "alert"
Source
Alert("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") }Button¶
Button("Save", systemImage:) · .buttonStyle(…)
role button · arguments label
Source
Button("Label")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")Dialog¶
role dialog · arguments title
Source
Dialog("Title") { Text("Content"); Button("Action") }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"])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")TextField¶
TextField("Placeholder", text: "value")
role textfield · arguments placeholder
Source
TextField("Placeholder")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") }