Skip to content

Fluent (WinUI 3)

Imitates: Fluent 2 · WinUI 3 (Windows 11 desktop apps) Windows App SDK 1.8 · Pack id: fluent · Selected by: pack="fluent", import WinUI, import FluentUI, import Fluent, import WindowsAppSDK, import Microsoft.UI.Xaml · Default device: desktop (windows chrome)

108 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

AnimatedVisualPlayer

role placeholder · arguments label · defaults icon: "sparkles"

Label
Source
AnimatedVisualPlayer("Label").frame(width: 160, height: 96)

AppBarButton

AppBarButton("Share", icon: "Share") inside a CommandBar

role button · arguments label · defaults variant: "appBar"

Label
Source
AppBarButton("Label")

AppBarElementContainer

role group

ContentAction
Source
AppBarElementContainer() { Text("Content"); Button("Action") }

AppBarSeparator

role divider

Source
AppBarSeparator()

AppBarToggleButton

selected: true = IsChecked

role button · arguments label · defaults variant: "appBar"

Label
Source
AppBarToggleButton("Label")

AutoSuggestBox

AutoSuggestBox("Search", text:) — query icon on the right

role textfield · arguments placeholder · defaults kind: "search"

Placeholder
Source
AutoSuggestBox("Placeholder")

BitmapIcon

role icon · arguments name

Source
BitmapIcon("star")

Border

A container; style it with .padding / .background / .cornerRadius / .border

role vstack · defaults alignment: "leading"

ContentAction
Source
Border() { Text("Content"); Button("Action") }

BreadcrumbBar(["System", "Display"]) · .variant(.title) for a page title

role breadcrumb · arguments items · variants default, title

default
title
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { BreadcrumbBar(["One", "Two", "Three"]).variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { BreadcrumbBar(["One", "Two", "Three"]).variant("title"); Text("title").font(.caption).foregroundStyle(.secondary) }
}

Button

Button("Save", icon:) · .buttonStyle(.accent | .subtle)

role button · arguments label · defaults variant: "standard" · variants standard, accent, subtle, hyperlink

Labelstandard
Labelaccent
Labelsubtle
Labelhyperlink
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("accent"); Text("accent").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("subtle"); Text("subtle").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("hyperlink"); Text("hyperlink").font(.caption).foregroundStyle(.secondary) }
}

CalendarDatePicker

CalendarDatePicker("Start", date:, placeholder: "Pick a date")

role datepicker · arguments header

Source
CalendarDatePicker("Header")

CalendarView

CalendarView(selection: "2026-11-23", showToday: true)

role calendar

November 2026
SuMoTuWeThFrSa12345678910111213141516171819202122232425262728293012345
Source
CalendarView()

Canvas

Overlapping layers

role zstack

ContentAction
Source
Canvas() { Text("Content"); Button("Action") }

CheckBox

CheckBox("Remember me", checked: true | .indeterminate)

role checkbox · arguments label

Label
Source
CheckBox("Label")

ColorPicker

role placeholder · arguments label · defaults icon: "palette"

Label
Source
ColorPicker("Label").frame(width: 160, height: 96)

ComboBox

ComboBox("Size", items: ["S", "M"], selection: "M", placeholder:, open: true)

role select · arguments header · variants editable

editable
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { ComboBox("Header").variant("editable"); Text("editable").font(.caption).foregroundStyle(.secondary) }
}

ComboBoxItem

role text · arguments content

Content
Source
ComboBoxItem("Content")

CommandBar

CommandBar { AppBarButton… } · .defaultLabelPosition(.bottom | .right | .collapsed); AppBarButton(icon: "More") for the overflow button

role toolbar · defaults placement: "right" · variants right, bottom, collapsed

right
bottom
collapsed
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { CommandBar() { Button("Save"); Button("Share") }.variant("right"); Text("right").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { CommandBar() { Button("Save"); Button("Share") }.variant("bottom"); Text("bottom").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { CommandBar() { Button("Save"); Button("Share") }.variant("collapsed"); Text("collapsed").font(.caption).foregroundStyle(.secondary) }
}

CommandBarFlyout

role menu · arguments label

Label
Source
CommandBarFlyout("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }

ContentDialog

ContentDialog("Save?", buttons: ["Save", "Don't save", "Cancel"], primary: "Save") { content }

role dialog · arguments title

Source
ContentDialog("Title") { Text("Content"); Button("Action") }

DataGrid

Community Toolkit DataGrid(columns: [...], rows: [[...]])

role table

NameStatus
Ana LimaActive
Ben OkaforAway
Source
DataGrid(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])

DataGridTemplateColumn

role tablecolumn · arguments title

Source
DataGridTemplateColumn("Title")

DataGridTextColumn

role tablecolumn · arguments title

Source
DataGridTextColumn("Title")

DatePicker

DatePicker("Birthday", date: "2026-11-23")

role datepicker · arguments header · defaults format: "long", variant: "fields"

Source
DatePicker("Header")

DockPanel

role vstack · defaults alignment: "stretch"

ContentAction
Source
DockPanel() { Text("Content"); Button("Action") }

Button with a chevron that opens a flyout

role button · arguments label · defaults dropdown: True, variant: "standard"

Label
Source
DropDownButton("Label")

Expander

Expander("Header", isExpanded: true) { content }

role accordion · arguments header

Header
Source
Expander("Header") { Text("Content"); Button("Action") }

FlipView

role placeholder · arguments label · defaults icon: "photo"

Label
Source
FlipView("Label").frame(width: 160, height: 96)

Flyout

A light-dismiss surface; place it with .overlay(alignment:)

role card · arguments title · defaults variant: "flyout"

Title
ContentAction
Source
Flyout("Title") { Text("Content"); Button("Action") }

FontIcon

FontIcon("Mail") — Fluent / Segoe Fluent Icons name

role icon · arguments name

Source
FontIcon("star")

Frame

Navigation host — renders its content

role group

ContentAction
Source
Frame() { Text("Content"); Button("Action") }

Grid

Grid(columns: 3) { … } — column count, or GridRow children

role grid

ContentAction
Source
Grid() { Text("Content"); Button("Action") }

GridView

GridView(columns: 4) { GridViewItem… }

role grid · defaults columns: 4

ContentAction
Source
GridView() { Text("Content"); Button("Action") }

GridViewItem

role vstack · defaults alignment: "stretch"

ContentAction
Source
GridViewItem() { Text("Content"); Button("Action") }

HeaderedContentControl

Header text above content

role section · arguments header

Header
First itemSecond item
Source
HeaderedContentControl("Header") { Text("First item"); Text("Second item") }

role link · arguments label, destination

Label
Source
Hyperlink("Label")

HyperlinkButton

Link-styled button

role button · arguments label · defaults variant: "hyperlink"

Label
Source
HyperlinkButton("Label")

ImageIcon

role icon · arguments name

Source
ImageIcon("star")

InfoBadge

InfoBadge(5) or InfoBadge() dot; .variant(.critical)

role badge · arguments value · defaults variant: "attention" · variants attention, informational, success, caution, critical

Valueattention
Valueinformational
Valuesuccess
Valuecaution
Valuecritical
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { InfoBadge("Value").variant("attention"); Text("attention").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { InfoBadge("Value").variant("informational"); Text("informational").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { InfoBadge("Value").variant("success"); Text("success").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { InfoBadge("Value").variant("caution"); Text("caution").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { InfoBadge("Value").variant("critical"); Text("critical").font(.caption).foregroundStyle(.secondary) }
}

InfoBar

InfoBar("Title", message:, severity: .informational|.success|.warning|.error) { … } actions: { Button }

role alert · arguments title · defaults isClosable: True, severity: "informational"

Source
InfoBar("Title")

ItemsRepeater

role vstack · defaults alignment: "stretch"

ContentAction
Source
ItemsRepeater() { Text("Content"); Button("Action") }

ItemsView

role grid · defaults columns: 3

ContentAction
Source
ItemsView() { Text("Content"); Button("Action") }

ListView

ListView { ListViewItem… } — selection with .selected()

role list

First item
Second item
Source
ListView() { Text("First item"); Text("Second item") }

ListViewHeaderItem

role text · arguments content

Content
Source
ListViewHeaderItem("Content")

ListViewItem

ListViewItem("Title", subtitle:, detail:, icon:, avatar:)

role listitem · arguments title

Title
Source
ListViewItem("Title")

MapControl

role placeholder · arguments label · defaults icon: "map"

Label
Source
MapControl("Label").frame(width: 160, height: 96)

MediaPlayerElement

role placeholder · arguments label · defaults icon: "play"

Label
Source
MediaPlayerElement("Label").frame(width: 160, height: 96)

MenuBar { MenuBarItem("File") { … } }

role toolbar · defaults variant: "menubar"

Source
MenuBar() { Button("Save"); Button("Share") }

MenuBarItem("Edit", open: true) { MenuFlyoutItem… }

role menu · arguments label · defaults caret: False, variant: "menubar"

Label
Source
MenuBarItem("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }

MenuFlyout { MenuFlyoutItem… } — open popup; with a label it is a button (open: true)

role menu · arguments label

Label
Source
MenuFlyout("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }

MenuFlyoutItem("Copy", icon: "Copy", shortcut: "Ctrl+C")

role menuitem · arguments label

Source
MenuFlyoutItem("Label")

role divider

Source
MenuFlyoutSeparator()

Item with a submenu chevron (children)

role menuitem · arguments label

Source
MenuFlyoutSubItem("Label")

NavigationView { pane items } content: { page } · .paneDisplayMode(.leftCompact | .top)

role split · defaults variant: "left" · variants left, leftCompact, leftMinimal, top, auto

Content
Action
left
Content
Action
leftCompact
Content
Action
leftMinimal
Content
Action
top
Content
Action
auto
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { NavigationView() { Text("Content"); Button("Action") }.variant("left"); Text("left").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { NavigationView() { Text("Content"); Button("Action") }.variant("leftCompact"); Text("leftCompact").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { NavigationView() { Text("Content"); Button("Action") }.variant("leftMinimal"); Text("leftMinimal").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { NavigationView() { Text("Content"); Button("Action") }.variant("top"); Text("top").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { NavigationView() { Text("Content"); Button("Action") }.variant("auto"); Text("auto").font(.caption).foregroundStyle(.secondary) }
}

NavigationViewItem("Home", icon: "Home", badge: 3) · .selected()

role navitem · arguments label

Label
Source
NavigationViewItem("Label")

role text · arguments content

Content
Source
NavigationViewItemHeader("Content")

role divider

Source
NavigationViewItemSeparator()

NumberBox

NumberBox("Quantity", text: "3") · .spinButtonPlacementMode(.inline | .compact)

role textfield · arguments header · defaults kind: "number", trailingIcon: "chevron.up.down" · variants hidden, compact, inline

hidden
compact
inline
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { NumberBox("Header").variant("hidden"); Text("hidden").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { NumberBox("Header").variant("compact"); Text("compact").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { NumberBox("Header").variant("inline"); Text("inline").font(.caption).foregroundStyle(.secondary) }
}

PasswordBox

PasswordBox("Password", text: "secret")

role textfield · arguments header · defaults kind: "password", reveal: True

Source
PasswordBox("Header")

PathIcon

role icon · arguments name

Source
PathIcon("star")

PersonPicture

PersonPicture("Ana Diaz", image:, initials:, badge:, size: .small|.large)

role avatar · arguments name

AL
Source
PersonPicture("Ana Lima")

PipsPager

PipsPager(count: 5, page: 2)

role pagination · defaults variant: "pips"

Source
PipsPager()

Pivot

Pivot { PivotItem("All") { … } }

role tabs · defaults placement: "top", variant: "pivot"

OneTwo
First tab
Source
Pivot() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }

PivotItem

role tab · arguments label

Source
PivotItem("Label")

ProgressBar

ProgressBar(value: 0.6) — no value = indeterminate; .state(.paused | .error)

role progress · arguments label

Label
Source
ProgressBar("Label")

ProgressRing

ProgressRing() indeterminate, or value: 0.7

role progress · arguments label · defaults variant: "ring"

Label
Source
ProgressRing("Label")

RadioButton

RadioButton("Small", checked: true)

role radio · arguments label

Label
Source
RadioButton("Label")

RadioButtons

RadioButtons("Theme", items: ["Light", "Dark"], selection: "Dark")

role radiogroup · arguments label

Label
Source
RadioButtons("Label")

RadioMenuFlyoutItem

checked: true

role menuitem · arguments label · defaults checked: False

Source
RadioMenuFlyoutItem("Label")

RangeSelector

Community Toolkit: value: [20, 80]

role slider · arguments label

Label
Source
RangeSelector("Label")

RatingControl

RatingControl(3.5, max: 5, label:)

role rating · arguments value

Source
RatingControl(60)

RelativePanel

role zstack

ContentAction
Source
RelativePanel() { Text("Content"); Button("Action") }

RepeatButton

role button · arguments label · defaults variant: "standard"

Label
Source
RepeatButton("Label")

RichEditBox

Multi-line rich text editor (rows:)

role textfield · arguments header · defaults kind: "multiline"

Source
RichEditBox("Header")

RichTextBlock

role text · arguments content

Content
Source
RichTextBlock("Content")

ScrollView

WinUI 1.5 ScrollView (static)

role scroll · arguments axes

ContentAction
Source
ScrollView() { Text("Content"); Button("Action") }

ScrollViewer

Scrolling region (static)

role scroll · arguments axes

ContentAction
Source
ScrollViewer() { Text("Content"); Button("Action") }

Segmented

Community Toolkit Segmented(items:, selection:)

role segmented · arguments items

OneTwoThree
Source
Segmented(["One", "Two", "Three"])

SelectorBar

SelectorBar { SelectorBarItem("Recent") … }

role tabs · defaults placement: "top", variant: "selector"

OneTwo
First tab
Source
SelectorBar() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }

SelectorBarItem

role tab · arguments label

Source
SelectorBarItem("Label")

SettingsCard

SettingsCard("Header", description:, icon:, chevron:) { control } — Community Toolkit

role listitem · arguments title

Title
Source
SettingsCard("Title")

SettingsExpander

SettingsExpander("Header", description:, icon:, expanded:) { SettingsCard… } trailing: { control }

role accordion · arguments header

Header
Source
SettingsExpander("Header") { Text("Content"); Button("Action") }

Slider

Slider("Volume", value: 40, in: 0...100, ticks: 10)

role slider · arguments label

Label
Source
Slider("Label")

SplitButton

Primary part + chevron part

role button · arguments label · defaults split: True, variant: "standard"

Label
Source
SplitButton("Label")

SplitView

SplitView { pane } content: { … }

role split

Content
Action
Source
SplitView() { Text("Content"); Button("Action") }

StackPanel

StackPanel(spacing: 8, orientation: .horizontal) { … } — children stretch across, controls keep their width (alignment: .leading to opt out)

role vstack · defaults alignment: "stretch"

ContentAction
Source
StackPanel() { Text("Content"); Button("Action") }

SymbolIcon

SymbolIcon("Accept") — Symbol enum name

role icon · arguments name

Source
SymbolIcon("star")

TabView

TabView(selection:) { TabViewItem("Doc.txt", icon:) { … } } — tabs with close buttons and “+”

role tabs · defaults placement: "top", variant: "document"

OneTwo
First tab
Source
TabView() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }

TabViewItem

role tab · arguments label

Source
TabViewItem("Label")

TeachingTip

TeachingTip("Title", subtitle:, placement: .bottom|.top|.bottomLeft|.bottomRight|.topLeft|.topRight) { target } actions: { Button }

role tooltip · arguments title · defaults placement: "bottom"

ContentActionTitle
Source
TeachingTip("Title") { Text("Content"); Button("Action") }

TextBlock

TextBlock("Hi", style: .titleTextBlockStyle) — Caption, Body, BodyStrong, BodyLarge, Subtitle, Title, TitleLarge, Display

role text · arguments content

Content
Source
TextBlock("Content")

TextBox

TextBox("Name", text:, placeholder:, description:) · .state(.focused)

role textfield · arguments header

Source
TextBox("Header")

TimePicker

TimePicker("Alarm", value: "7:30 AM")

role datepicker · arguments header · defaults kind: "time", variant: "fields"

Source
TimePicker("Header")

TitleBar

TitleBar("App", subtitle:, logo: "icon", back: true, menu: true) content: { AutoSuggestBox } { right header }

role appbar · arguments title

Source
TitleBar("Title") { Text("Content"); Button("Action") }

ToggleButton

ToggleButton("Bold", selected: true) — selected is IsChecked

role button · arguments label · defaults variant: "standard"

Label
Source
ToggleButton("Label")

ToggleMenuFlyoutItem

checked: true

role menuitem · arguments label · defaults checked: False

Source
ToggleMenuFlyoutItem("Label")

ToggleSplitButton

SplitButton whose primary part toggles (selected:)

role button · arguments label · defaults split: True, variant: "standard"

Label
Source
ToggleSplitButton("Label")

ToggleSwitch

ToggleSwitch("Wi-Fi", isOn: true, onText:, offText:) — label is the Header

role toggle · arguments label · defaults offText: "Off", onText: "On"

LabelOff
Source
ToggleSwitch("Label")

TokenizingTextBox

role textfield · arguments header

Source
TokenizingTextBox("Header")

ToolTip

ToolTip("Hint") { target }

role tooltip · arguments text

ContentActionText
Source
ToolTip("Text") { Text("Content"); Button("Action") }

TreeView

TreeView { TreeViewItem("Docs", icon:, expanded: true) { … } }

role list · defaults variant: "tree"

First item
Second item
Source
TreeView() { Text("First item"); Text("Second item") }

TreeViewItem

role navitem · arguments label

Label
Source
TreeViewItem("Label")

TreeViewNode

role navitem · arguments label

Label
Source
TreeViewNode("Label")

TwoPaneView

TwoPaneView { pane1 } content: { pane2 }

role split

Content
Action
Source
TwoPaneView() { Text("Content"); Button("Action") }

UniformGrid

Community Toolkit UniformGrid(columns: n)

role grid

ContentAction
Source
UniformGrid() { Text("Content"); Button("Action") }

Viewbox

role zstack

ContentAction
Source
Viewbox() { Text("Content"); Button("Action") }

WebView2

role placeholder · arguments label · defaults icon: "globe"

Label
Source
WebView2("Label").frame(width: 160, height: 96)

WrapPanel

Community Toolkit WrapPanel

role hstack · defaults wrap: True

ContentAction
Source
WrapPanel() { Text("Content"); Button("Action") }

Core vocabulary in this style

Accordion

role accordion · arguments title

Title
Source
Accordion("Title") { Text("Content"); Button("Action") }

Alert

role dialog · arguments title · defaults variant: "alert"

Source
Alert("Title") { Text("Content"); Button("Action") }

AppBar

role appbar · arguments title

Source
AppBar("Title") { Text("Content"); Button("Action") }

AreaChart

role chart · defaults kind: "area"

Source
AreaChart(values: [3, 5, 2, 6, 4])

AsyncImage

role image · arguments url

Source
AsyncImage().frame(width: 160, height: 96)

Avatar

role avatar · arguments name

AL
Source
Avatar("Ana Lima")

Badge

role badge · arguments text

Text
Source
Badge("Text")

role alert · arguments title

Source
Banner("Title")

BarChart

role chart · defaults kind: "bar"

Source
BarChart(values: [3, 5, 2, 6, 4])

Board

Kanban board of BoardColumn children

role board

To do1
Write copy
Add card
Source
Board() { BoardColumn("To do") { KanbanCard("Write copy") } }

BoardColumn

BoardColumn("To do", count:, color:) { KanbanCard(…) }

role boardcolumn · arguments title

Title2
Write copy
Review
Add card
Source
BoardColumn("Title") { KanbanCard("Write copy"); KanbanCard("Review") }

role breadcrumb · arguments items

Source
Breadcrumb(["One", "Two", "Three"])

BubbleChart

role chart · defaults kind: "bubble"

Source
BubbleChart(values: [3, 5, 2, 6, 4])

Calendar

role calendar

November 2026
SuMoTuWeThFrSa12345678910111213141516171819202122232425262728293012345
Source
Calendar()

Callout

a numbered annotation; place with .position(x:y:)

role callout · arguments number, text

1Text
Source
Callout(1, "Text")

CandlestickChart

role chart · defaults kind: "candlestick"

Source
CandlestickChart(values: [3, 5, 2, 6, 4])

Capsule

role shape · defaults shape: "capsule"

Source
Capsule().frame(width: 160, height: 96)

Card

role card · arguments title

Title
ContentAction
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])

Checkbox

role checkbox · arguments label

Label
Source
Checkbox("Label")

Chip

role chip · arguments label

Label
Source
Chip("Label")

Circle

role shape · defaults shape: "circle"

Source
Circle().frame(width: 160, height: 96)

CodeBlock

role code · arguments code · defaults lineNumbers: False

let total = items.count
Source
CodeBlock("let total = items.count")

CodeEditor

CodeEditor("…", language: "swift", lineNumbers:, highlight: [3], tabs: [..])

role code · arguments code

1let total = items.count
Source
CodeEditor("let total = items.count")

Color

role color · arguments color

Source
Color(.blue).frame(width: 160, height: 96)

ColorSwatches

colors: [.red, "#0af", …], selection:

role swatches

Source
ColorSwatches()

ComboChart

role chart · defaults kind: "combo"

Source
ComboChart(values: [3, 5, 2, 6, 4])

Comment

author:, time:, avatar:

role message · arguments text · defaults variant: "comment"

Text
Source
Comment("Text")

ControlGroup

role toolbar · defaults variant: "group"

Source
ControlGroup() { Button("Save"); Button("Share") }

Dialog

role dialog · arguments title

Source
Dialog("Title") { Text("Content"); Button("Action") }

DisclosureGroup

role accordion · arguments title

Title
Source
DisclosureGroup("Title") { Text("Content"); Button("Action") }

Divider

role divider

Source
Divider()

DonutChart

role chart · defaults kind: "donut"

Source
DonutChart(values: [3, 5, 2, 6, 4])

Dropzone

role dropzone · arguments label

Label
Source
Dropzone("Label")

Ellipse

role shape · defaults shape: "ellipse"

Source
Ellipse().frame(width: 160, height: 96)

EmptyState

title, systemImage:, description: { actions }

role emptystate · arguments title

Title
Source
EmptyState("Title")

FloatingActionButton

role fab · arguments icon

Source
FloatingActionButton("star")

Form

role form

Name
Notifications
Source
Form() { TextField("Name"); Toggle("Notifications", isOn: true) }

FunnelChart

role chart · defaults kind: "funnel"

Source
FunnelChart(values: [3, 5, 2, 6, 4])

Gantt

scale: ["W1",…], tasks: [("Design", 0, 2, 0.6), …], today:

role gantt

1234567
Design
Build
Source
Gantt(tasks: [("Design", 0, 3), ("Build", 2, 5)])

Gauge

role progress · arguments value · defaults variant: "gauge"

Source
Gauge(60)

GaugeChart

role chart · defaults kind: "gauge"

Source
GaugeChart(values: [3, 5, 2, 6, 4])

GridRow

role gridrow

ContentAction
Source
GridRow() { Text("Content"); Button("Action") }

Group

role group

ContentAction
Source
Group() { Text("Content"); Button("Action") }

GroupBox

role card · arguments title

Title
ContentAction
Source
GroupBox("Title") { Text("Content"); Button("Action") }

HStack

Horizontal stack. spacing:, alignment: .top|.center|.bottom

role hstack

ContentAction
Source
HStack() { Text("Content"); Button("Action") }

Heatmap

role chart · defaults kind: "heatmap"

Source
Heatmap(values: [3, 5, 2, 6, 4])

Histogram

role chart · defaults kind: "histogram"

Source
Histogram(values: [3, 5, 2, 6, 4])

Icon

role icon · arguments name

Source
Icon("star")

IconButton

role button · arguments icon · defaults iconOnly: True

Source
IconButton("star")

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

Title
Source
KanbanCard("Title")

Kbd

Kbd(["⌘", "K"]) or Kbd("Esc")

role kbd · arguments keys

⌘K
Source
Kbd(["⌘", "K"])

Label

Label("Inbox", systemImage: "tray")

role label · arguments title

Title
Source
Label("Title")

LabeledContent

role labeled · arguments label, value

LabelContentAction
Source
LabeledContent("Label", "Value") { Text("Content"); Button("Action") }

LazyHGrid

role grid

ContentAction
Source
LazyHGrid() { Text("Content"); Button("Action") }

LazyHStack

role hstack

ContentAction
Source
LazyHStack() { Text("Content"); Button("Action") }

LazyVGrid

columns: [GridItem(.flexible()), …] or a count

role grid

ContentAction
Source
LazyVGrid() { Text("Content"); Button("Action") }

LazyVStack

role vstack

ContentAction
Source
LazyVStack() { Text("Content"); Button("Action") }

LineChart

role chart · defaults kind: "line"

Source
LineChart(values: [3, 5, 2, 6, 4])

role link · arguments label, destination

Label
Source
Link("Label")

List

.listStyle(.insetGrouped|.plain|.sidebar|…)

role list

First item
Second item
Source
List() { Text("First item"); Text("Second item") }

ListItem

role listitem · arguments title

Title
Source
ListItem("Title")

Map

pins: [(x%, y%, "label")], route:, showsUserLocation:, height:

role map

Source
Map().frame(width: 160, height: 96)

role menu · arguments label

Label
Source
Menu("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }

role menuitem · arguments label

Source
MenuItem("Label")

MessageBubble

MessageBubble("Hi", from: .me|.them, author:, time:, status:, reactions: [..])

role message · arguments text

Text
Source
MessageBubble("Text")

role navitem · arguments label

Label
Source
NavItem("Label")

role listitem · arguments title · defaults chevron: True

Title
Source
NavigationLink("Title")

{ sidebar } content: { … } detail: { … }

role split

Content
Action
Source
NavigationSplitView() { Text("Content"); Button("Action") }

Content's .navigationTitle / .toolbar form the bar

role navstack

ContentAction
Source
NavigationStack() { Text("Content"); Button("Action") }

Pagination

role pagination

Source
Pagination()

Picker

Picker("Size", selection: "M") { Text("S") … }

role select · arguments label

Source
Picker("Label")

PieChart

role chart · defaults kind: "pie"

Source
PieChart(values: [3, 5, 2, 6, 4])

Placeholder

A labelled box for maps, charts, media

role placeholder · arguments label

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

Label
Source
ProgressView("Label")

RadarChart

role chart · defaults kind: "radar"

Source
RadarChart(values: [3, 5, 2, 6, 4])

RadioGroup

role radiogroup · arguments label

Label
Source
RadioGroup("Label")

Rating

role rating · arguments value

Source
Rating(60)

Rectangle

role shape · defaults shape: "rectangle"

Source
Rectangle().frame(width: 160, height: 96)

RoundedRectangle

role shape · defaults shape: "rounded"

Source
RoundedRectangle().frame(width: 160, height: 96)

Row

title, subtitle:, detail:, systemImage:, chevron:

role listitem · arguments title

Title
Source
Row("Title")

ScatterChart

role chart · defaults kind: "scatter"

Source
ScatterChart(values: [3, 5, 2, 6, 4])

Schedule

days: [..], startHour:, endHour:, events: [("Standup", "Mon", 9, 9.5, .blue)], now:

role schedule

8:009:0010:0011:0012:0013:0014:0015:0016:0017:00
Mon
Tue
Wed
Thu
Fri
Source
Schedule()

SearchField

role textfield · arguments placeholder · defaults kind: "search"

Placeholder
Source
SearchField("Placeholder")

Section

Section("Header") { … } footer: { … }

role section · arguments title

Title
First itemSecond item
Source
Section("Title") { Text("First item"); Text("Second item") }

SecureField

role textfield · arguments placeholder · defaults kind: "password"

Placeholder
Source
SecureField("Placeholder")

SegmentedControl

role segmented · arguments items

OneTwoThree
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") }

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)

Spacer

role spacer

Source
Spacer()

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

AB
1AB
212
334
Source
Spreadsheet(columns: ["A", "B"], rows: [[1, 2], [3, 4]])

Stat

Stat("Revenue", "$48k", change: "+12%", trend: [..], systemImage:)

role stat · arguments label, value

Label
60
Source
Stat("Label", 60)

Stepper

role stepper · arguments label

Label
Source
Stepper("Label")

Steps

role steps · arguments steps

1Cart
2Shipping
3Payment
Source
Steps(["Cart", "Shipping", "Payment"])

StickyNote

StickyNote("Call Ana", color: .yellow, rotation: -2, author:)

role stickynote · arguments text

Text
Source
StickyNote("Text")

Tab

Tab("Home", systemImage: "house") { … }

role tab · arguments label

Source
Tab("Label")

Table

columns: ["Name", …], rows: [[…], …] or TableRow children

role table

NameStatus
Ana LimaActive
Ben OkaforAway
Source
Table(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])

TableColumn

role tablecolumn · arguments title

Source
TableColumn("Title")

TableRow

role tablerow

Source
TableRow()

Tabs

role tabs · arguments items · defaults placement: "top"

OneTwo
First tab
Source
Tabs(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }

Tag

role chip · arguments label

Label
Source
Tag("Label")

Terminal

lines starting with "$ " are commands

role code · arguments code · defaults variant: "terminal"

Terminal
let total = items.count
Source
Terminal("let total = items.count")

Text

Text with bold, italic, code Markdown

role text · arguments content

Content
Source
Text("Content")

TextEditor

role textfield · arguments text · defaults kind: "multiline"

Text
Source
TextEditor("Text")

TextField

TextField("Placeholder", text: "value")

role textfield · arguments placeholder

Placeholder
Source
TextField("Placeholder")

Timeline

role timeline

Created
Shipped
Source
Timeline() { TimelineItem("Created"); TimelineItem("Shipped") }

TimelineItem

title, time:, description:, systemImage:, status:

role timelineitem · arguments title

Title
Source
TimelineItem("Title")

Toast

role toast · arguments message

Message
Source
Toast("Message")

Toggle

Toggle("Wi-Fi", isOn: true)

role toggle · arguments label

Label
Source
Toggle("Label")

Toolbar

role toolbar

Source
Toolbar() { Button("Save"); Button("Share") }

ToolbarItem

ToolbarItem(placement: .topBarTrailing) { … }

role toolbaritem

ContentAction
Source
ToolbarItem() { Text("Content"); Button("Action") }

ToolbarItemGroup

role toolbaritem

ContentAction
Source
ToolbarItemGroup() { Text("Content"); Button("Action") }

Tooltip

role tooltip · arguments text

ContentActionText
Source
Tooltip("Text") { Text("Content"); Button("Action") }

Tree

Tree { TreeItem("src") { TreeItem("main.swift") } }

role tree

Folder
File
Source
Tree() { TreeItem("Folder") { TreeItem("File") } }

TreeItem

label, systemImage:, folder:, expanded:, selected:, detail:

role treeitem · arguments label

Label
Source
TreeItem("Label")

Treemap

role chart · defaults kind: "treemap"

Source
Treemap(values: [3, 5, 2, 6, 4])

VStack

Vertical stack. spacing:, alignment: .leading|.center|.trailing

role vstack

ContentAction
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"

ContentAction
Source
Whiteboard() { Text("Content"); Button("Action") }.frame(width: 160, height: 96)

ZStack

Overlapping layers. alignment:

role zstack

ContentAction
Source
ZStack() { Text("Content"); Button("Action") }