KDE Plasma (Breeze)¶
Imitates: KDE Plasma 6 apps · Kirigami (KF6) and Qt Widgets · Breeze style, Breeze Light / Breeze Dark colours Plasma 6.2 · KDE Frameworks 6 · Pack id: kde-plasma · Selected by: pack="kde-plasma", import KDE, import Plasma, import Breeze, import Kirigami, import KF6 · Default device: desktop (kde chrome)
113 own elements, plus 119 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¶
AbstractCard¶
Kirigami.AbstractCard { … } — the card frame with free content
role card · arguments title
Source
AbstractCard("Title") { Text("Content"); Button("Action") }Action¶
Kirigami.Action("Add", icon: "list-add") — shown as a tool button in toolbars and page headers
role button · arguments label · defaults variant: "tool"
Source
Action("Label")ActionButton¶
Kirigami floating action button (Plasma Mobile pages)
role fab · arguments icon
Source
ActionButton("star")ActionTextField¶
Kirigami.ActionTextField with inline actions
role textfield · arguments placeholder · defaults clearButton: True
Source
ActionTextField("Placeholder")ActionToolBar¶
Kirigami.ActionToolBar { Action… }
role toolbar · defaults variant: "actions"
Source
ActionToolBar() { Button("Save"); Button("Share") }ApplicationWindow¶
Kirigami.ApplicationWindow { GlobalDrawer { … } PageRow { Page… } } — drawer and page stack side by side, filling the window
role hstack · defaults alignment: "top"
Source
ApplicationWindow() { Text("Content"); Button("Action") }Avatar¶
Kirigami.Avatar("Ana Diaz", image:, size: .small|.large)
role avatar · arguments name
Source
Avatar("Ana Lima")Breadcrumb¶
Dolphin's location bar (KUrlNavigator) in breadcrumb mode: Breadcrumb(["Home", "Documents", "Taxes"])
role breadcrumb · arguments items
Source
Breadcrumb(["One", "Two", "Three"])BusyIndicator¶
BusyIndicator() — the spinning process-working icon
role progress · arguments label · defaults variant: "spinner"
Source
BusyIndicator("Label")Button¶
Button("Apply", icon: "dialog-ok-apply") · highlighted: true for the default button · flat: true · checked: true
role button · arguments label · defaults variant: "normal" · variants normal, flat, highlighted, default
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Button("Label").variant("normal"); Text("normal").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Button("Label").variant("flat"); Text("flat").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Button("Label").variant("highlighted"); Text("highlighted").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Button("Label").variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
}ButtonGroup¶
ButtonGroup(items: ["A", "B"], selection: "A") — exclusive radio buttons
role radiogroup · arguments label
Source
ButtonGroup("Label")Card¶
Kirigami.Card("Title", subtitle:, image:) { contentItem } actions: { Action… }
role card · arguments title
Source
Card("Title") { Text("Content"); Button("Action") }CardsLayout¶
Kirigami.CardsLayout(columns: 3) { Card… }
role grid · defaults columns: 2
Source
CardsLayout() { Text("Content"); Button("Action") }CheckBox¶
CheckBox("Show hidden files", checked: true | .indeterminate)
role checkbox · arguments label
Source
CheckBox("Label")CheckDelegate¶
CheckDelegate("Item", checked: true)
role listitem · arguments title · defaults checkbox: True
Source
CheckDelegate("Title")Chip¶
Kirigami.Chip("Tag", closable: true, checked: true)
role chip · arguments label · defaults checkmark: False
Source
Chip("Label")ColumnLayout¶
QtQuick.Layouts ColumnLayout(spacing: 6)
role vstack · defaults alignment: "leading"
Source
ColumnLayout() { Text("Content"); Button("Action") }ComboBox¶
ComboBox(items: ["Icons", "Details"], selection: "Icons", open: true) — label: is the FormLayout label
role select · arguments label
Source
ComboBox("Label")ContextDrawer¶
Kirigami.ContextDrawer("Actions") { … } — page-specific actions on the right
role sidebar · arguments title · defaults variant: "context"
Source
ContextDrawer("Title") { Text("Content"); Button("Action") }ContextualHelpButton¶
Kirigami.ContextualHelpButton — a (?) tool button
role button · arguments label · defaults icon: "help-contents", iconOnly: True, variant: "tool"
Source
ContextualHelpButton("Label")DetailsView¶
Dolphin's details view: DetailsView(columns: ["Name", "Size", "Modified"], rows: …, selection: [0])
role table · defaults variant: "details"
| Name | Status |
|---|---|
| Ana Lima | Active |
| Ben Okafor | Away |
Source
DetailsView(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])Dialog¶
Kirigami.Dialog("Title", buttons: ["OK", "Cancel"], primary: "OK") { content }
role dialog · arguments title · defaults closable: True
Source
Dialog("Title") { Text("Content"); Button("Action") }DockWidget¶
QDockWidget / Kate tool view: a titled panel (Dolphin Information, Kate Projects…)
role card · arguments title · defaults variant: "dock"
Source
DockWidget("Title") { Text("Content"); Button("Action") }DrawerAction¶
An action in a GlobalDrawer: DrawerAction("Inbox", icon:, badge:) · .selected()
role navitem · arguments label
Source
DrawerAction("Label")FlexColumn¶
Kirigami.FlexColumn — a centred column of limited width
role vstack · defaults alignment: "stretch"
Source
FlexColumn() { Text("Content"); Button("Action") }FormButtonDelegate¶
FormButtonDelegate("About", icon:, description:)
role listitem · arguments title · defaults chevron: True
Source
FormButtonDelegate("Title")FormCard¶
Kirigami Addons FormCard { FormTextDelegate … }
role card · arguments title · defaults variant: "formcard"
Source
FormCard("Title") { Text("Content"); Button("Action") }FormCardPage¶
Kirigami Addons FormCardPage("Settings") { FormHeader … FormCard { … } }
role navstack · arguments title · defaults titleDisplayMode: "inline"
Source
FormCardPage("Title") { Text("Content"); Button("Action") }FormCheckDelegate¶
FormCheckDelegate("Show badge", checked: true)
role checkbox · arguments label
Source
FormCheckDelegate("Label")FormComboBoxDelegate¶
FormComboBoxDelegate("Theme", items:, selection:)
role select · arguments label
Source
FormComboBoxDelegate("Label")FormDelegateSeparator¶
Separator between FormCard delegates
role divider
Source
FormDelegateSeparator()FormHeader¶
FormHeader("General") — the title above a FormCard
role text · arguments content
Source
FormHeader("Content")FormLayout¶
Kirigami.FormLayout { TextField(label: "Name:") … } — labels right-aligned in a column, controls left-aligned
role form
Source
FormLayout() { TextField("Name"); Toggle("Notifications", isOn: true) }FormRow¶
FormRow("Clicking files:") { RadioButton… } — any content under a right-aligned FormLayout label
role labeled · arguments label
Source
FormRow("Label") { Text("Content"); Button("Action") }FormSection¶
A FormLayout section: Kirigami.Separator with Kirigami.FormData.isSection and a label
role section · arguments title
Source
FormSection("Title") { Text("First item"); Text("Second item") }FormSwitchDelegate¶
FormSwitchDelegate("Notifications", description:, checked: true)
role toggle · arguments label
Source
FormSwitchDelegate("Label")FormTextDelegate¶
FormTextDelegate("Version", description: "6.2")
role listitem · arguments title
Source
FormTextDelegate("Title")FormTextFieldDelegate¶
FormTextFieldDelegate("Name", text:)
role textfield · arguments label
Source
FormTextFieldDelegate("Label")Frame¶
QQC2 Frame / QFrame: a bordered box
role card · arguments title · defaults variant: "frame"
Source
Frame("Title") { Text("Content"); Button("Action") }GlobalDrawer¶
Kirigami.GlobalDrawer("App", titleIcon:) { Action / NavItem… } — the application's main navigation
role sidebar · arguments title · defaults variant: "global"
Source
GlobalDrawer("Title") { Text("Content"); Button("Action") }GridLayout¶
GridLayout(columns: 3) { … }
role grid
Source
GridLayout() { Text("Content"); Button("Action") }GroupBox¶
GroupBox("Title") { … } — QGroupBox with its title above the frame
role card · arguments title · defaults variant: "groupbox"
Source
GroupBox("Title") { Text("Content"); Button("Action") }HamburgerMenu¶
The KHamburgerMenu button at the end of the toolbar (open: true shows the menu)
role menu · arguments label · defaults icon: "application-menu", variant: "tool"
Source
HamburgerMenu("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }Heading¶
Kirigami.Heading("Title", level: 1…5) — 1.35×, 1.2×, 1.15×, 1.1×, 1× the default font; type: .primary is bold
role text · arguments content · defaults level: 1
Source
Heading("Content")IconView¶
Dolphin's icons view: IconView(columns: 6) { file items }
role grid · defaults columns: 6
Source
IconView() { Text("Content"); Button("Action") }InlineMessage¶
Kirigami.InlineMessage("Text", type: .information|.positive|.warning|.error, showCloseButton: true, position: .header) actions: { Action… }
role alert · arguments text · defaults type: "information"
Source
InlineMessage("Text")KCM¶
A System Settings module page: KCM("Mouse") { FormLayout { … } } · .toolbar { ToolbarItem(placement: .bottomBar) { Help / Defaults / Reset / Apply } }
role navstack · arguments title · defaults titleDisplayMode: "inline"
Source
KCM("Title") { Text("Content"); Button("Action") }KCMCategory¶
KCMCategory("Appearance", icon:, chevron: true) · .selected() — chevron: a category holding sub-pages
role navitem · arguments label
Source
KCMCategory("Label")KCMSidebar¶
System Settings' category sidebar: KCMSidebar { SearchField KCMCategory… }
role sidebar · arguments title · defaults variant: "kcm"
Source
KCMSidebar("Title") { Text("Content"); Button("Action") }KMessageWidget¶
KMessageWidget (Qt Widgets): KMessageWidget("Text", type: .warning)
role alert · arguments text · defaults type: "information"
Source
KMessageWidget("Text")LinkButton¶
Kirigami.LinkButton("Learn more")
role link · arguments label, destination
Source
LinkButton("Label")ListItem¶
ListItem("Title", subtitle:, icon:, detail:) — Kirigami delegate
role listitem · arguments title
Source
ListItem("Title")ListSectionHeader¶
Kirigami.ListSectionHeader("Today") { rows }
role section · arguments title
Source
ListSectionHeader("Title") { Text("First item"); Text("Second item") }ListView¶
ListView { ItemDelegate… }
role list
Source
ListView() { Text("First item"); Text("Second item") }LoadingPlaceholder¶
Kirigami.LoadingPlaceholder
role skeleton
Source
LoadingPlaceholder().frame(width: 160, height: 96)MainWindow¶
QMainWindow / KXmlGuiWindow: MenuBar, ToolBar, central widget and StatusBar stacked, filling the window
role vstack · defaults alignment: "stretch"
Source
MainWindow() { Text("Content"); Button("Action") }Menu¶
Menu { MenuItem("Copy", icon: "edit-copy", shortcut: "Ctrl+C") … }
role menu · arguments label
Source
Menu("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }MenuBar¶
MenuBar { MenuBarItem("File") … }
role toolbar · defaults variant: "menubar"
Source
MenuBar() { Button("Save"); Button("Share") }MenuBarItem¶
MenuBarItem("Edit", open: true) { MenuItem… }
role menu · arguments label · defaults caret: False, variant: "menubar"
Source
MenuBarItem("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }MenuDialog¶
Kirigami.MenuDialog
role dialog · arguments title · defaults closable: True
Source
MenuDialog("Title") { Text("Content"); Button("Action") }MenuItem¶
MenuItem("Paste", icon:, shortcut:, checked:)
role menuitem · arguments label
Source
MenuItem("Label")MessageBox¶
KMessageBox("Title", message:, icon: "dialog-warning", buttons: […])
role dialog · arguments title · defaults variant: "messagebox"
Source
MessageBox("Title") { Text("Content"); Button("Action") }NavigationTabBar¶
Kirigami.NavigationTabBar { NavigationTabButton("Home", icon:) … } — the Plasma Mobile bottom bar
role tabs · defaults placement: "bottom", variant: "navigation"
Source
NavigationTabBar() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }NavigationTabButton¶
NavigationTabButton("Library", icon: "folder", badge: 3)
role tab · arguments label
Source
NavigationTabButton("Label")Notification¶
A Plasma notification popup: Notification("Title", body:, icon:) actions: { HStack { Button… } }
role toast · arguments message · defaults closable: True, position: "bottomTrailing"
Source
Notification("Message")OverlayDrawer¶
Kirigami.OverlayDrawer
role sidebar · arguments title · defaults variant: "global"
Source
OverlayDrawer("Title") { Text("Content"); Button("Action") }OverlaySheet¶
Kirigami.OverlaySheet
role dialog · arguments title · defaults closable: True
Source
OverlaySheet("Title") { Text("Content"); Button("Action") }Page¶
Kirigami.Page("Title") { … } — title on the left of the page header; .toolbar { Action… } for page actions
role navstack · arguments title · defaults titleDisplayMode: "inline"
Source
Page("Title") { Text("Content"); Button("Action") }PageRow¶
Kirigami PageRow (pageStack): pages side by side as columns — the first ones 360 px wide, the last fills
role split
Source
PageRow() { Text("Content"); Button("Action") }PasswordField¶
Kirigami.PasswordField(text: "secret")
role textfield · arguments placeholder · defaults kind: "password", reveal: True
Source
PasswordField("Placeholder")PlaceholderMessage¶
Kirigami.PlaceholderMessage("No files", explanation: "…", icon: "folder") { helpfulAction Button }
role emptystate · arguments title · defaults icon: "dialog-information"
Source
PlaceholderMessage("Title")PlacesItem¶
PlacesItem("Home", icon: "user-home") · .selected()
role navitem · arguments label
Source
PlacesItem("Label")PlacesPanel¶
Dolphin's Places panel: PlacesPanel { Section("Places") { PlacesItem… } … }
role sidebar · arguments title · defaults variant: "places"
Source
PlacesPanel("Title") { Text("Content"); Button("Action") }PlasmaPanel¶
The Plasma panel (task manager, system tray, clock) — place at the bottom of a desktop mockup
role toolbar · defaults variant: "panel"
Source
PlasmaPanel() { Button("Save"); Button("Share") }Plasmoid¶
A Plasma applet popup / desktop widget
role card · arguments title · defaults variant: "plasmoid"
Source
Plasmoid("Title") { Text("Content"); Button("Action") }ProgressBar¶
ProgressBar(value: 0.6) — no value = indeterminate
role progress · arguments label
Source
ProgressBar("Label")PromptDialog¶
Kirigami.PromptDialog("Delete file?", subtitle: "…", buttons: ["Delete", "Cancel"], destructive: "Delete")
role dialog · arguments title
Source
PromptDialog("Title") { Text("Content"); Button("Action") }RadioButton¶
RadioButton("Single-click", checked: true)
role radio · arguments label
Source
RadioButton("Label")RadioDelegate¶
RadioDelegate("Item", checked: true)
role radio · arguments label
Source
RadioDelegate("Label")RoundButton¶
QQC2 RoundButton(icon:)
role button · arguments icon · defaults iconOnly: True, variant: "round"
Source
RoundButton("star")RowLayout¶
QtQuick.Layouts RowLayout(spacing: 6)
role hstack
Source
RowLayout() { Text("Content"); Button("Action") }ScrollView¶
QQC2 ScrollView (static)
role scroll · arguments axes
Source
ScrollView() { Text("Content"); Button("Action") }ScrollablePage¶
Kirigami.ScrollablePage("Title") { … } — a Page whose content scrolls
role navstack · arguments title · defaults titleDisplayMode: "inline"
Source
ScrollablePage("Title") { Text("Content"); Button("Action") }SearchField¶
Kirigami.SearchField(text:)
role textfield · arguments placeholder · defaults kind: "search", placeholder: "Search…"
Source
SearchField()SelectableLabel¶
Kirigami.SelectableLabel
role text · arguments content
Source
SelectableLabel("Content")Slider¶
Slider(value: 40, from: 0, to: 100, ticks: 10)
role slider · arguments label
Source
Slider("Label")SpinBox¶
SpinBox(value: 5, suffix: " px") — up/down arrows on the right
role textfield · arguments value · defaults kind: "number", trailingIcon: "chevron.up.down"
Source
SpinBox("Value")Splitter¶
QSplitter / SplitView: children side by side with a handle; columnWidths: [240, 600]
role split
Source
Splitter() { Text("Content"); Button("Action") }StatusBar¶
QStatusBar (Dolphin, Kate): small text on the left, zoom slider and free-space bar on the right
role toolbar · defaults variant: "statusbar"
Source
StatusBar() { Button("Save"); Button("Share") }SubtitleDelegate¶
Kirigami.SubtitleDelegate("Title", subtitle:, icon:)
role listitem · arguments title
Source
SubtitleDelegate("Title")SwipeListItem¶
Kirigami.SwipeListItem("Title", subtitle:) actions: { Action… } — inline actions at the end
role listitem · arguments title
Source
SwipeListItem("Title")Switch¶
Switch("Enable", checked: true) — the indicator sits before the text
role toggle · arguments label
Source
Switch("Label")SwitchDelegate¶
SwitchDelegate("Item", checked: true)
role toggle · arguments label
Source
SwitchDelegate("Label")SystemMonitorSensor¶
A System Monitor sensor face: SystemMonitorSensor("CPU", "23 %", trend: [...])
role stat · arguments label, value
Source
SystemMonitorSensor("Label", 60)TabBar¶
TabBar(selection: "Files") { TabButton("Files") … }
role tabs · defaults placement: "top"
Source
TabBar() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }TabButton¶
TabButton("General", icon:) { content }
role tab · arguments label
Source
TabButton("Label")TabWidget¶
QTabWidget / document tabs (Kate, Konsole): TabWidget { TabButton("main.cpp") { … } }
role tabs · defaults placement: "top", variant: "document"
Source
TabWidget() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }TableView¶
QTableView / TableView(columns: [...], rows: [[...]], selection: [1])
role table
| Name | Status |
|---|---|
| Ana Lima | Active |
| Ben Okafor | Away |
Source
TableView(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])TextArea¶
TextArea(text:, rows: 4)
role textfield · arguments text · defaults kind: "multiline"
Source
TextArea("Text")TextField¶
TextField("Placeholder", text:, label:) — label: is the FormLayout label
role textfield · arguments placeholder
Source
TextField("Placeholder")ToolBar¶
ToolBar { ToolButton… } — the main window toolbar, merged with the title bar in Plasma 6
role toolbar
Source
ToolBar() { Button("Save"); Button("Share") }ToolButton¶
ToolButton("Split", icon: "view-split-left-right") — flat until hovered; checked: true
role button · arguments label · defaults variant: "tool"
Source
ToolButton("Label")ToolTip¶
ToolTip("Hint") { target }
role tooltip · arguments text
Source
ToolTip("Text") { Text("Content"); Button("Action") }TreeView¶
QTreeView / TreeView { TreeViewItem("src", folder: true) { … } }
role tree
Source
TreeView() { TreeItem("Folder") { TreeItem("File") } }TreeViewItem¶
TreeViewItem("main.cpp", icon:, expanded:, selected:)
role treeitem · arguments label
Source
TreeViewItem("Label")UrlButton¶
Kirigami.UrlButton("kde.org")
role link · arguments label, destination
Source
UrlButton("Label")UrlNavigator¶
KUrlNavigator — same as Breadcrumb
role breadcrumb · arguments items
Source
UrlNavigator(["One", "Two", "Three"])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") }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)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") }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()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")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") }