SAPUI5¶
Imitates: SAPUI5 / OpenUI5 · SAP Fiori Horizon theme (sap_horizon, sap_horizon_dark) 1.136 · Pack id: sapui5 · Selected by: pack="sapui5", import SAPUI5, import OpenUI5, import UI5, import Fiori, import sap.m, import sap.f, import sap.uxap, import sap.tnt · Default device: desktop (browser chrome)
128 own elements, plus 114 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¶
ActionListItem¶
sap.m.ActionListItem: centered action text
role listitem · arguments title
Source
ActionListItem("Title")ActionSheet¶
sap.m.ActionSheet: a menu of buttons
role menu
Source
ActionSheet() { Button("Open"); Button("Save"); Divider(); Button("Close") }AnchorBar¶
sap.uxap.AnchorBar(items: [section titles], selection:)
role tabs · arguments items
Source
AnchorBar(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }App¶
sap.m.App: the root container
role vstack · defaults alignment: "stretch", spacing: 0
Source
App() { Text("Content"); Button("Action") }Avatar¶
sap.m.Avatar(initials, src:); .displayShape(.Square), .displaySize(.L), .backgroundColor(.Accent6)
role avatar · arguments initials · variants Circle, Square
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Avatar("AL").variant("Circle"); Text("Circle").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Avatar("AL").variant("Square"); Text("Square").font(.caption).foregroundStyle(.secondary) }
}AvatarGroup¶
sap.f.AvatarGroup
role hstack
Source
AvatarGroup() { Text("Content"); Button("Action") }Bar¶
sap.m.Bar: left/middle/right content; use ToolbarSpacer between
role toolbar
Source
Bar() { Button("Save"); Button("Share") }Breadcrumbs¶
sap.m.Breadcrumbs(items: [..., current])
role breadcrumb · arguments items
Source
Breadcrumbs(["One", "Two", "Three"])BusyIndicator¶
sap.m.BusyIndicator: three pulsing dots
role progress · arguments label · defaults variant: "circular"
Source
BusyIndicator("Label")Button¶
sap.m.Button; .type(.Emphasized) etc.; icon: "sap-icon://add"
role button · arguments text · variants Default, Emphasized, Transparent, Ghost, Accept, Reject, Attention, Negative, Critical, Success, Neutral, Back, Up, Unstyled
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Button("Text").variant("Default"); Text("Default").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Button("Text").variant("Emphasized"); Text("Emphasized").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Button("Text").variant("Transparent"); Text("Transparent").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Button("Text").variant("Ghost"); Text("Ghost").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Button("Text").variant("Accept"); Text("Accept").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Button("Text").variant("Reject"); Text("Reject").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Button("Text").variant("Attention"); Text("Attention").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Button("Text").variant("Negative"); Text("Negative").font(.caption).foregroundStyle(.secondary) }
}Calendar¶
sap.ui.unified.Calendar(selection: "2026-11-24")
role calendar
Source
Calendar()Card¶
sap.f.Card(title, subtitle, icon:, status:) { content }
role card · arguments title, subtitle
Source
Card("Title", "Subtitle") { Text("Content"); Button("Action") }Carousel¶
sap.m.Carousel { Image(…) … }: first page + page indicator
role scroll · defaults axes: "horizontal"
Source
Carousel() { Text("Content"); Button("Action") }CheckBox¶
sap.m.CheckBox("text", selected: true)
role checkbox · arguments label
Source
CheckBox("Label")Column¶
sap.m.Column(header text, alignment: .End)
role tablecolumn · arguments title
Source
Column("Title")DatePicker¶
sap.m.DatePicker(value: "2026-11-24")
role datepicker · arguments label
Source
DatePicker("Label")DateRangeSelection¶
sap.m.DateRangeSelection(value: "Nov 1 – Nov 30, 2026")
role datepicker · arguments label
Source
DateRangeSelection("Label")DateTimePicker¶
sap.m.DateTimePicker
role datepicker · arguments label · defaults kind: "datetime"
Source
DateTimePicker("Label")Dialog¶
sap.m.Dialog(title, state:, buttons: [...]) { content } actions: { buttons }
role dialog · arguments title
Source
Dialog("Title") { Text("Content"); Button("Action") }DisplayListItem¶
sap.m.DisplayListItem(label, value)
role listitem · arguments label, detail
Source
DisplayListItem("Label", "Detail")DynamicPage¶
sap.f.DynamicPage { DynamicPageTitle; DynamicPageHeader; content }
role vstack · defaults alignment: "stretch", spacing: 0
Source
DynamicPage() { Text("Content"); Button("Action") }DynamicPageHeader¶
sap.f.DynamicPageHeader: collapsible header content (filter bar, key facts)
role vstack · defaults alignment: "stretch"
Source
DynamicPageHeader() { Text("Content"); Button("Action") }DynamicPageTitle¶
sap.f.DynamicPageTitle(heading, subtitle) { key info } actions: { buttons }
role card · arguments title, subtitle
Source
DynamicPageTitle("Title", "Subtitle") { Text("Content"); Button("Action") }ExpandableText¶
sap.m.ExpandableText
role text · arguments content
Source
ExpandableText("Content")FeedListItem¶
sap.m.FeedListItem(sender, text, avatar:, detail: timestamp)
role listitem · arguments title, subtitle
Source
FeedListItem("Title", "Subtitle")FileUploader¶
sap.ui.unified.FileUploader
role textfield · arguments placeholder · defaults trailingIcon: "sap-icon://upload"
Source
FileUploader("Placeholder")FilterBar¶
sap.ui.comp FilterBar: labelled filter fields + Go
role toolbar
Source
FilterBar() { Button("Save"); Button("Share") }FlexBox¶
sap.m.FlexBox; wrap: true wraps
role hstack
Source
FlexBox() { Text("Content"); Button("Action") }FlexibleColumnLayout¶
sap.f.FlexibleColumnLayout { begin } { mid } { end } as children; .layout(.TwoColumnsBeginExpanded)
role split · defaults variant: "TwoColumnsMidExpanded" · variants OneColumn, TwoColumnsBeginExpanded, TwoColumnsMidExpanded, ThreeColumnsMidExpanded, ThreeColumnsEndExpanded
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { FlexibleColumnLayout() { Text("Content"); Button("Action") }.variant("OneColumn"); Text("OneColumn").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FlexibleColumnLayout() { Text("Content"); Button("Action") }.variant("TwoColumnsBeginExpanded"); Text("TwoColumnsBeginExpanded").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FlexibleColumnLayout() { Text("Content"); Button("Action") }.variant("TwoColumnsMidExpanded"); Text("TwoColumnsMidExpanded").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FlexibleColumnLayout() { Text("Content"); Button("Action") }.variant("ThreeColumnsMidExpanded"); Text("ThreeColumnsMidExpanded").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { FlexibleColumnLayout() { Text("Content"); Button("Action") }.variant("ThreeColumnsEndExpanded"); Text("ThreeColumnsEndExpanded").font(.caption).foregroundStyle(.secondary) }
}Form¶
sap.ui.layout.form.Form { FormContainer { FormElement } }
role form · arguments title
Source
Form("Title") { TextField("Name"); Toggle("Notifications", isOn: true) }FormContainer¶
sap.ui.layout.form.FormContainer
role section · arguments title
Source
FormContainer("Title") { Text("First item"); Text("Second item") }FormElement¶
sap.ui.layout.form.FormElement(label) { fields }
role labeled · arguments label
Source
FormElement("Label") { Text("Content"); Button("Action") }FormattedText¶
sap.m.FormattedText (inline bold, italic, code, link)
role text · arguments content
Source
FormattedText("Content")GenericTile¶
sap.m.GenericTile(header, subheader, icon:) { TileContent(footer:) { NumericContent } }; .frameType(.TwoByOne)
role card · arguments title, subtitle · variants TileContent, ActionMode, ArticleMode
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { GenericTile("Title", "Subtitle") { Text("Content"); Button("Action") }.variant("TileContent"); Text("TileContent").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { GenericTile("Title", "Subtitle") { Text("Content"); Button("Action") }.variant("ActionMode"); Text("ActionMode").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { GenericTile("Title", "Subtitle") { Text("Content"); Button("Action") }.variant("ArticleMode"); Text("ArticleMode").font(.caption).foregroundStyle(.secondary) }
}GroupHeaderListItem¶
sap.m.GroupHeaderListItem
role listitem · arguments title
Source
GroupHeaderListItem("Title")HBox¶
sap.m.HBox (FlexBox, row)
role hstack
Source
HBox() { Text("Content"); Button("Action") }IconTabBar¶
sap.m.IconTabBar(selection:) { IconTabFilter(…) }
role tabs · arguments items
Source
IconTabBar(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }IconTabFilter¶
sap.m.IconTabFilter(text, icon:) { content }; .count(12)
role tab · arguments text
Source
IconTabFilter("Text")IllustratedMessage¶
sap.m.IllustratedMessage(title, description:, icon:) { additional buttons }
role dropzone · arguments title · defaults icon: "sap-icon://search"
Source
IllustratedMessage("Title")InfoLabel¶
sap.tnt.InfoLabel; .colorScheme(.c7) or color: 1…10
role badge · arguments text
Source
InfoLabel("Text")Input¶
sap.m.Input(placeholder, value:, label:); .valueState(.Error), error: "text" for the value state message
role textfield · arguments placeholder
Source
Input("Placeholder")InputListItem¶
sap.m.InputListItem(label) { control }
role listitem · arguments label
Source
InputListItem("Label")Item¶
sap.ui.core.Item: an option of Select / ComboBox / SegmentedButton
role text · arguments text
Source
Item("Text")Label¶
sap.m.Label: field caption in sapContent_LabelColor
role text · arguments content
Source
Label("Content")List¶
sap.m.List(header:) { StandardListItem … }
role list
Source
List() { Text("First item"); Text("Second item") }MaskInput¶
sap.m.MaskInput
role textfield · arguments placeholder
Source
MaskInput("Placeholder")Menu¶
sap.m.Menu (standalone without a label)
role menu · arguments label
Source
Menu("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }MenuButton¶
sap.m.MenuButton { MenuItem(…) }; open: true shows the menu
role menu · arguments label · variants Default, Emphasized, Transparent, Ghost
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { MenuButton("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }.variant("Default"); Text("Default").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { MenuButton("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }.variant("Emphasized"); Text("Emphasized").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { MenuButton("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }.variant("Transparent"); Text("Transparent").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { MenuButton("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }.variant("Ghost"); Text("Ghost").font(.caption).foregroundStyle(.secondary) }
}MessageBox¶
sap.m.MessageBox(title, message:, state: .Error|.Warning|.Success|.Information, icon:, buttons:)
role dialog · arguments title
Source
MessageBox("Title") { Text("Content"); Button("Action") }MessageItem¶
sap.m.MessageItem(title, subtitle:, icon:, status:)
role listitem · arguments title
Source
MessageItem("Title")MessagePopover¶
sap.m.MessagePopover { MessageItem … }
role dialog · arguments title · defaults variant: "popover"
Source
MessagePopover("Title") { Text("Content"); Button("Action") }MessageStrip¶
sap.m.MessageStrip(text, type: .Information|.Success|.Warning|.Error, showCloseButton:)
role alert · arguments text
Source
MessageStrip("Text")MessageToast¶
sap.m.MessageToast("Saved")
role toast · arguments message
Source
MessageToast("Message")MultiComboBox¶
sap.m.MultiComboBox(selection: ["A", "B"]): tokens in the field
role select · arguments label
Source
MultiComboBox("Label")MultiInput¶
sap.m.MultiInput(selection: [tokens]) with value help
role select · arguments label · defaults trailingIcon: "sap-icon://value-help"
Source
MultiInput("Label")NavigationList¶
sap.tnt.NavigationList
role group
Source
NavigationList() { Text("Content"); Button("Action") }NavigationListItem¶
sap.tnt.NavigationListItem(text, icon:) with nested items
role navitem · arguments label
Source
NavigationListItem("Label")NotificationListItem¶
sap.m.NotificationListItem(title, description:, avatar:, detail: time, status: .Error)
role listitem · arguments title
Source
NotificationListItem("Title")NumericContent¶
sap.m.NumericContent(value, scale, color: .Good|.Critical|.Error); .indicator(.Up)
role labeled · arguments value, label
Source
NumericContent("Value", "Label") { Text("Content"); Button("Action") }ObjectAttribute¶
sap.m.ObjectAttribute(title, text) → “Title: text”
role labeled · arguments title, text
Source
ObjectAttribute("Title", "Text") { Text("Content"); Button("Action") }ObjectHeader¶
sap.m.ObjectHeader(title, number) { ObjectAttribute; ObjectStatus }
role card · arguments title, status
Source
ObjectHeader("Title", "Status") { Text("Content"); Button("Action") }ObjectIdentifier¶
sap.m.ObjectIdentifier(title, text): bold title over a grey text
role labeled · arguments title, text
Source
ObjectIdentifier("Title", "Text") { Text("Content"); Button("Action") }ObjectListItem¶
sap.m.ObjectListItem(title, number) { ObjectAttribute; ObjectStatus }
role listitem · arguments title, detail
Source
ObjectListItem("Title", "Detail")ObjectMarker¶
sap.m.ObjectMarker (Favorite, Flagged, Draft …)
role badge · arguments text · defaults icon: "sap-icon://favorite"
Source
ObjectMarker("Text")ObjectNumber¶
sap.m.ObjectNumber("1,250.00", "EUR", state:)
role labeled · arguments value, label
Source
ObjectNumber("Value", "Label") { Text("Content"); Button("Action") }ObjectPageDynamicHeaderTitle¶
alias of ObjectPageHeader
role card · arguments title, subtitle
Source
ObjectPageDynamicHeaderTitle("Title", "Subtitle") { Text("Content"); Button("Action") }ObjectPageHeader¶
sap.uxap.ObjectPageDynamicHeaderTitle(title, subtitle, avatar:) { header facts } actions: { … }
role card · arguments title, subtitle
Source
ObjectPageHeader("Title", "Subtitle") { Text("Content"); Button("Action") }ObjectPageLayout¶
sap.uxap.ObjectPageLayout { ObjectPageHeader; AnchorBar; ObjectPageSection … }
role vstack · defaults alignment: "stretch", spacing: 0
Source
ObjectPageLayout() { Text("Content"); Button("Action") }ObjectPageSection¶
sap.uxap.ObjectPageSection(title) { content }
role section · arguments title
Source
ObjectPageSection("Title") { Text("First item"); Text("Second item") }ObjectPageSubSection¶
sap.uxap.ObjectPageSubSection
role section · arguments title
Source
ObjectPageSubSection("Title") { Text("First item"); Text("Second item") }ObjectStatus¶
sap.m.ObjectStatus(text, state: .Success|.Warning|.Error|.Information|.Indication05, icon:); .inverted()
role badge · arguments text
Source
ObjectStatus("Text")OverflowToolbar¶
sap.m.OverflowToolbar: header toolbar of tables and lists
role toolbar
Source
OverflowToolbar() { Button("Save"); Button("Share") }OverflowToolbarButton¶
sap.m.OverflowToolbarButton: icon-only transparent button
role button · arguments icon · defaults iconOnly: True, variant: "Transparent"
Source
OverflowToolbarButton("star")Page¶
sap.m.Page: header Bar with title (start-aligned in Horizon), content; back: true shows the nav button
role navstack · arguments title · defaults titleDisplayMode: "inline"
Source
Page("Title") { Text("Content"); Button("Action") }Panel¶
sap.m.Panel(headerText, expanded:)
role accordion · arguments title · defaults expanded: True
Source
Panel("Title") { Text("Content"); Button("Action") }Popover¶
sap.m.Popover
role dialog · arguments title · defaults variant: "popover"
Source
Popover("Title") { Text("Content"); Button("Action") }ProductSwitch¶
sap.f.ProductSwitch { ProductSwitchItem(title, icon:) }
role grid · defaults columns: 4
Source
ProductSwitch() { Text("Content"); Button("Action") }ProductSwitchItem¶
sap.f.ProductSwitchItem
role button · arguments text
Source
ProductSwitchItem("Text")ProgressIndicator¶
sap.m.ProgressIndicator(value: 60, state: .Success)
role progress · arguments value · defaults showValue: True
Source
ProgressIndicator(60)RadioButton¶
sap.m.RadioButton("text", selected: true)
role radio · arguments label
Source
RadioButton("Label")RadioButtonGroup¶
sap.m.RadioButtonGroup(options: [...], selection: 0)
role radiogroup · arguments label
Source
RadioButtonGroup("Label")RatingIndicator¶
sap.m.RatingIndicator(value: 4, max: 5)
role rating · arguments value
Source
RatingIndicator(60)ResponsivePopover¶
sap.m.ResponsivePopover
role dialog · arguments title · defaults variant: "popover"
Source
ResponsivePopover("Title") { Text("Content"); Button("Action") }ScrollContainer¶
sap.m.ScrollContainer
role scroll · arguments axes
Source
ScrollContainer() { Text("Content"); Button("Action") }SearchField¶
sap.m.SearchField (magnifier at the end)
role textfield · arguments placeholder · defaults kind: "search"
Source
SearchField("Placeholder")SegmentedButton¶
sap.m.SegmentedButton(items: [...], selection:) or SegmentedButtonItem children
role segmented · arguments items
Source
SegmentedButton(["One", "Two", "Three"])SegmentedButtonItem¶
sap.m.SegmentedButtonItem
role button · arguments text
Source
SegmentedButtonItem("Text")Shell¶
sap.m.Shell: letterboxed app root
role vstack · defaults alignment: "stretch", spacing: 0
Source
Shell() { Text("Content"); Button("Action") }ShellBar¶
sap.f.ShellBar(title, secondaryTitle:, logo:, search:, notifications: 3, avatar: "JD") { extra buttons, e.g. product switch }
role appbar · arguments title
Source
ShellBar("Title") { Text("Content"); Button("Action") }SideNavigation¶
sap.tnt.SideNavigation(selection:) { NavigationListItem … } footer: { fixed items }
role sidebar · arguments title
Source
SideNavigation("Title") { Text("Content"); Button("Action") }SimpleForm¶
sap.ui.layout.form.SimpleForm(title) { Title; Label; Input … }: labels at the start on desktop
role form · arguments title
Source
SimpleForm("Title") { TextField("Name"); Toggle("Notifications", isOn: true) }SplitApp¶
sap.m.SplitApp: master + detail
role split
Source
SplitApp() { Text("Content"); Button("Action") }SplitContainer¶
sap.m.SplitContainer
role split
Source
SplitContainer() { Text("Content"); Button("Action") }StandardListItem¶
sap.m.StandardListItem(title, description:, icon:, info:, status:, count:); .type(.Navigation)
role listitem · arguments title
Source
StandardListItem("Title")StepInput¶
sap.m.StepInput(value: 3): − value + in one field
role stepper · arguments label
Source
StepInput("Label")TabContainer¶
sap.m.TabContainer
role tabs · arguments items
Source
TabContainer(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }Table¶
sap.m.Table(selectable:) { Column(…) … ColumnListItem { cells } } header: { OverflowToolbar }
role table
| Name | Status |
|---|---|
| Ana Lima | Active |
| Ben Okafor | Away |
Source
Table(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])TextArea¶
sap.m.TextArea(value, rows:)
role textfield · arguments value · defaults kind: "multiline"
Source
TextArea("Value")TileContent¶
sap.m.TileContent(footer, unit:) { NumericContent }
role section · arguments footer
Source
TileContent("Footer") { Text("First item"); Text("Second item") }TimePicker¶
sap.m.TimePicker
role datepicker · arguments label · defaults kind: "time"
Source
TimePicker("Label")Title¶
sap.m.Title; level: .H1 … .H6 (or .titleStyle(.H3)) sets the size
role text · arguments content · defaults style: "H5"
Source
Title("Content")ToggleButton¶
sap.m.ToggleButton; .pressed() shows the pressed state
role toggle · arguments label · defaults variant: "button"
Source
ToggleButton("Label")Tokenizer¶
sap.m.Tokenizer { Token(…) }
role hstack · defaults spacing: 4, wrap: True
Source
Tokenizer() { Text("Content"); Button("Action") }ToolHeader¶
sap.tnt.ToolHeader
role appbar · arguments title
Source
ToolHeader("Title") { Text("Content"); Button("Action") }ToolPage¶
sap.tnt.ToolPage { ToolHeader; HStack { SideNavigation; content } }
role vstack · defaults alignment: "stretch", spacing: 0
Source
ToolPage() { Text("Content"); Button("Action") }ToolbarSpacer¶
sap.m.ToolbarSpacer: pushes the following content to the end
role spacer
Source
ToolbarSpacer()UploadSet¶
sap.m.upload.UploadSet drop area
role dropzone · arguments label
Source
UploadSet("Label")VBox¶
sap.m.VBox (FlexBox, column)
role vstack · defaults alignment: "leading"
Source
VBox() { Text("Content"); Button("Action") }VariantManagement¶
sap.ui.fl VariantManagement (“Standard ▾” title)
role menu · arguments label
Source
VariantManagement("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }Wizard¶
sap.m.Wizard(selection: 1) { WizardStep(title) { content } … }: numbered progress navigator
role tabs
Source
Wizard() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }WizardStep¶
sap.m.WizardStep(title) { content }
role tab · arguments title
Source
WizardStep("Title")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") }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") }DisclosureGroup¶
role accordion · arguments title
Source
DisclosureGroup("Title") { Text("Content"); Button("Action") }EmptyState¶
title, systemImage:, description: { actions }
role emptystate · arguments title
Source
EmptyState("Title")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") }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") }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") }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") } }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")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") }