Avalonia UI¶
Imitates: Avalonia UI 11 · FluentTheme (cross-platform .NET desktop apps) Avalonia 11.3 · Pack id: avalonia · Selected by: pack="avalonia", import Avalonia, import AvaloniaUI, import Avalonia.Controls, import Avalonia.Themes.Fluent · Default device: desktop (windows chrome)
96 own elements, plus 118 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¶
AutoCompleteBox¶
AutoCompleteBox(text: "Lis", items: ["Lisbon", "Lismore"], isDropDownOpen: true, watermark:)
role select · arguments label · defaults variant: "autocomplete"
Source
AutoCompleteBox("Label")Border¶
A decorator: style with .padding / .background / .cornerRadius / .border
role vstack · defaults alignment: "stretch"
Source
Border() { Text("Content"); Button("Action") }Button¶
Button("Save", icon:) · classes: "accent" (Classes="accent") for the accent button
role button · arguments label · defaults variant: "default" · variants default, accent, transparent
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Button("Label").variant("default"); Text("default").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("transparent"); Text("transparent").font(.caption).foregroundStyle(.secondary) }
}ButtonSpinner¶
role textfield · arguments text · defaults kind: "number", trailingIcon: "chevron.up.down"
Source
ButtonSpinner("Text")Calendar¶
Calendar(selectedDate: "2026-11-18") — today (Nov 23) has the accent fill, the selection an accent ring
role calendar · defaults showToday: True
Source
Calendar()CalendarDatePicker¶
CalendarDatePicker(selectedDate: "2026-11-23", watermark:) — a TextBox with a calendar button
role datepicker · arguments label · defaults format: "numeric"
Source
CalendarDatePicker("Label")Canvas¶
Absolute positioning: place children with .position(x:y:) (Canvas.Left/Top)
role canvas
Source
Canvas() { Text("Content"); Button("Action") }.frame(width: 160, height: 96)Carousel¶
Carousel { current item } — one item at a time
role zstack
Source
Carousel() { Text("Content"); Button("Action") }CartesianChart¶
LiveCharts2 CartesianChart(kind: .line|.bar|.area, series:, labels:)
role chart · defaults kind: "line"
Source
CartesianChart(values: [3, 5, 2, 6, 4])CheckBox¶
CheckBox("Remember me", isChecked: true | .indeterminate) — IsThreeState shows the dash
role checkbox · arguments label
Source
CheckBox("Label")ColorPicker¶
ColorPicker(colors: ["#0078d7"], selection: 0) — the drop-down button with its colour preview
role swatches · arguments label · defaults variant: "picker"
Source
ColorPicker("Label")ColorSpectrum¶
role placeholder · arguments label · defaults systemImage: "sun"
Source
ColorSpectrum("Label").frame(width: 160, height: 96)ColorView¶
ColorView palette: colors: [..], selection:
role swatches · arguments label
Source
ColorView("Label")ComboBox¶
ComboBox(items: ["S", "M"], selectedItem: "M", placeholderText:, isDropDownOpen: true) or ComboBoxItem children
role select · arguments label
Source
ComboBox("Label")ContentControl¶
Hosts one piece of content
role group
Source
ContentControl() { Text("Content"); Button("Action") }ContextMenu¶
ContextMenu { MenuItem… } — an open popup (place it with .padding / .position)
role menu
Source
ContextMenu() { Button("Open"); Button("Save"); Divider(); Button("Close") }DataGrid¶
Avalonia.Controls.DataGrid(columns: [...], rows: [[...]], selected: [1]) or DataGrid*Column children
role table · defaults variant: "dataGrid"
| Name | Status |
|---|---|
| Ana Lima | Active |
| Ben Okafor | Away |
Source
DataGrid(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])DatePicker¶
DatePicker(selectedDate: "2026-11-23") — month · day · year segments
role datepicker · arguments label · defaults format: "long", variant: "fields"
Source
DatePicker("Label")Dialog¶
A modal child Window (ShowDialog): Dialog("Title") { content } actions: { Button… }
role dialog · arguments title · defaults closable: True
Source
Dialog("Title") { Text("Content"); Button("Action") }DockPanel¶
DockPanel { top docks… ; fill } — docked children in order; put a left/right dock and the fill in an HStack
role vstack · defaults alignment: "stretch", spacing: 0
Source
DockPanel() { Text("Content"); Button("Action") }DropDownButton¶
Button with a chevron that opens a Flyout
role button · arguments label · defaults dropdown: True, variant: "default"
Source
DropDownButton("Label")Expander¶
Expander("Header", isExpanded: true) { content }
role accordion · arguments header
Source
Expander("Header") { Text("Content"); Button("Action") }Flyout¶
A light-dismiss popup surface; place with .overlay(alignment:) or .position
role card · arguments title · defaults variant: "flyout"
Source
Flyout("Title") { Text("Content"); Button("Action") }Grid¶
Grid(columns: 3, spacing: 12) { … } — column count (ColumnDefinitions as a count), or GridRow children
role grid
Source
Grid() { Text("Content"); Button("Action") }HeaderedContentControl¶
HeaderedContentControl("Header") { content }
role section · arguments header
Source
HeaderedContentControl("Header") { Text("First item"); Text("Second item") }HyperlinkButton¶
HyperlinkButton("Learn more", navigateUri:) — link-styled button
role button · arguments label · defaults variant: "hyperlink"
Source
HyperlinkButton("Label")Image¶
Image("assets/images/photo-1.svg") or Image(source:)
role image · arguments name
Source
Image().frame(width: 160, height: 96)ItemsControl¶
Repeats an item template: use ForEach inside
role vstack · defaults alignment: "stretch"
Source
ItemsControl() { Text("Content"); Button("Action") }ItemsRepeater¶
Avalonia.Controls.ItemsRepeater: ForEach inside; .orientation(.horizontal) for a row
role vstack · defaults alignment: "stretch"
Source
ItemsRepeater() { Text("Content"); Button("Action") }Label¶
Label("Name:") — a ContentControl caption for an input (Target:)
role text · arguments content
Source
Label("Content")LayoutTransformControl¶
role group
Source
LayoutTransformControl() { Text("Content"); Button("Action") }ListBox¶
ListBox { ListBoxItem… } — selection uses the accent list brush; .selected() on an item
role list · defaults variant: "listBox"
Source
ListBox() { Text("First item"); Text("Second item") }ListBoxItem¶
ListBoxItem("Title", subtitle:, detail:, icon:) or a custom item template as children
role listitem · arguments title
Source
ListBoxItem("Title")MaskedTextBox¶
MaskedTextBox(mask: "(000) 000-0000") — the mask shows when empty
role textfield · arguments text
Source
MaskedTextBox("Text")Menu¶
Menu { MenuItem("File") … MenuBarItem("Edit", isSubMenuOpen: true) { MenuItem("Copy", inputGesture: "Ctrl+C") } }
role toolbar · defaults variant: "menubar"
Source
Menu() { Button("Save"); Button("Share") }MenuBarItem¶
A top-level MenuItem of a Menu with its submenu (XAML writes MenuItem; this name lets it open: isSubMenuOpen: true)
role menu · arguments label · defaults caret: False, variant: "menubar"
Source
MenuBarItem("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }MenuFlyout¶
MenuFlyout { MenuItem… } — an open flyout; MenuFlyout("Sort", isOpen: true) { … } draws the DropDownButton that owns it
role menu · arguments label
Source
MenuFlyout("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }MenuItem¶
MenuItem("Copy", icon:, inputGesture: "Ctrl+C", isChecked:) — children make a submenu; in a Menu bar a closed top-level item
role menuitem · arguments label
Source
MenuItem("Label")NotificationCard¶
NotificationCard("Saved", message:, type: .information|.success|.warning|.error) — put inside WindowNotificationManager
role toast · arguments title · defaults inline: True, severity: "information"
Source
NotificationCard("Title")NumericUpDown¶
NumericUpDown(value: 3, minimum:, maximum:, formatString:) — spinner on the right
role textfield · arguments value · defaults kind: "number", trailingIcon: "chevron.up.down"
Source
NumericUpDown("Value")Panel¶
Children overlap (Panel stacks them on top of each other)
role zstack
Source
Panel() { Text("Content"); Button("Action") }PathIcon¶
PathIcon("Settings") — a geometry icon (FluentIcons names work)
role icon · arguments name
Source
PathIcon("star")PieChart¶
LiveCharts2 PieChart(values:, labels:)
role chart · defaults kind: "donut"
Source
PieChart(values: [3, 5, 2, 6, 4])PolarChart¶
LiveCharts2 PolarChart(series:, labels:)
role chart · defaults kind: "radar"
Source
PolarChart(values: [3, 5, 2, 6, 4])Popup¶
role card · arguments title · defaults variant: "flyout"
Source
Popup("Title") { Text("Content"); Button("Action") }ProgressBar¶
ProgressBar(value: 60) — 0…100 (Maximum:); no value = indeterminate; showProgressText: true
role progress · arguments label · defaults total: 100
Source
ProgressBar("Label")RadioButton¶
RadioButton("Small", isChecked: true, groupName:)
role radio · arguments label
Source
RadioButton("Label")RefreshContainer¶
Pull-to-refresh host; refreshing: true shows the visualizer
role vstack · defaults alignment: "stretch"
Source
RefreshContainer() { Text("Content"); Button("Action") }RefreshVisualizer¶
The pull-to-refresh spinner
role progress · defaults kind: "circular"
Source
RefreshVisualizer()RepeatButton¶
Fires repeatedly while pressed
role button · arguments label · defaults variant: "default"
Source
RepeatButton("Label")ReversibleStackPanel¶
role vstack · defaults alignment: "stretch"
Source
ReversibleStackPanel() { Text("Content"); Button("Action") }ScrollViewer¶
Scrolling region (static; Fluent overlay scroll bars are hidden at rest)
role scroll · arguments axes
Source
ScrollViewer() { Text("Content"); Button("Action") }SelectableTextBlock¶
Text the user can select and copy
role text · arguments content
Source
SelectableTextBlock("Content")Slider¶
Slider(value: 40, minimum: 0, maximum: 100, ticks: 10)
role slider · arguments label
Source
Slider("Label")SplitButton¶
Primary part + chevron that opens a Flyout
role button · arguments label · defaults split: True, variant: "default"
Source
SplitButton("Label")SplitView¶
SplitView(displayMode: .inline) { pane } content: { … } — the pane sits on PaneBackground
role split · defaults variant: "inline" · variants inline, compactInline, overlay, compactOverlay
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { SplitView() { Text("Content"); Button("Action") }.variant("inline"); Text("inline").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { SplitView() { Text("Content"); Button("Action") }.variant("compactInline"); Text("compactInline").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { SplitView() { Text("Content"); Button("Action") }.variant("overlay"); Text("overlay").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { SplitView() { Text("Content"); Button("Action") }.variant("compactOverlay"); Text("compactOverlay").font(.caption).foregroundStyle(.secondary) }
}StackPanel¶
StackPanel(spacing: 8, orientation: .horizontal) { … } — vertical by default, children stretch across
role vstack · defaults alignment: "stretch"
Source
StackPanel() { Text("Content"); Button("Action") }SymbolIcon¶
FluentIcons.Avalonia SymbolIcon(symbol: "Home")
role icon · arguments name
Source
SymbolIcon("star")TabControl¶
TabControl(selectedIndex: 0) { TabItem("General") { … } } — 24 px SemiLight headers with the accent pipe
role tabs · defaults placement: "top", variant: "tabControl"
Source
TabControl() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }TabStrip¶
TabStrip(items: [..], selectedIndex:) — headers only
role tabs · arguments items · defaults placement: "top", variant: "tabStrip"
Source
TabStrip(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }TextBlock¶
TextBlock("Hi", classes: "h2") — Text; .font(.title2), FontWeight via .bold()
role text · arguments content
Source
TextBlock("Content")TextBox¶
TextBox("text", watermark: "Hint", label:) · .passwordChar("•") · .acceptsReturn() (rows:) · classes: "clearButton" / "revealPasswordButton"
role textfield · arguments text
Source
TextBox("Text")TextEditor¶
AvaloniaEdit TextEditor("…", language:, lineNumbers:, highlight: [3]) — ShowLineNumbers
role code · arguments code
Source
TextEditor("let total = items.count")TimePicker¶
TimePicker(selectedTime: "7:30 AM")
role datepicker · arguments label · defaults kind: "time", variant: "fields"
Source
TimePicker("Label")TitleBar¶
A client-area title bar (ExtendClientAreaToDecorationsHint): TitleBar("App", logo:) { trailing controls }
role appbar · arguments title
Source
TitleBar("Title") { Text("Content"); Button("Action") }ToggleButton¶
ToggleButton("Bold", isChecked: true) — checked uses the accent fill
role button · arguments label · defaults variant: "default"
Source
ToggleButton("Label")ToggleSplitButton¶
SplitButton whose primary part toggles (isChecked:)
role button · arguments label · defaults split: True, variant: "default"
Source
ToggleSplitButton("Label")ToggleSwitch¶
ToggleSwitch("Wi-Fi", isChecked: true, onContent:, offContent:) — Content is the header above the switch
role toggle · arguments label · defaults offText: "Off", onText: "On"
Source
ToggleSwitch("Label")ToolTip¶
ToolTip("Hint") { target } — ToolTip.Tip
role tooltip · arguments text
Source
ToolTip("Text") { Text("Content"); Button("Action") }TransitioningContentControl¶
Shows the current page (transitions are static)
role group
Source
TransitioningContentControl() { Text("Content"); Button("Action") }TreeView¶
TreeView { TreeViewItem("src", isExpanded: true) { TreeViewItem("App.axaml") } }
role tree
Source
TreeView() { TreeItem("Folder") { TreeItem("File") } }TreeViewItem¶
TreeViewItem("Header", icon:, isExpanded:, isSelected:) { children }
role treeitem · arguments label
Source
TreeViewItem("Label")UniformGrid¶
UniformGrid(columns: n) { … }
role grid
Source
UniformGrid() { Text("Content"); Button("Action") }UserControl¶
A reusable view's root
role vstack · defaults alignment: "stretch", spacing: 0
Source
UserControl() { Text("Content"); Button("Action") }Viewbox¶
Scales its child (static)
role zstack
Source
Viewbox() { Text("Content"); Button("Action") }VirtualizingStackPanel¶
role vstack · defaults alignment: "stretch"
Source
VirtualizingStackPanel() { Text("Content"); Button("Action") }Window¶
Window { … } — the top-level window's content (title and decorations come from the fence's title/chrome)
role vstack · defaults alignment: "stretch", spacing: 0
Source
Window() { Text("Content"); Button("Action") }WindowNotificationManager¶
Hosts NotificationCards in a window corner (position: .topRight|.bottomRight|.topLeft|.bottomLeft)
role vstack · defaults alignment: "stretch", position: "topRight", spacing: 8
Source
WindowNotificationManager() { Text("Content"); Button("Action") }WrapPanel¶
Children left to right, wrapping
role hstack · defaults wrap: True
Source
WrapPanel() { Text("Content"); Button("Action") }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])Card¶
role card · arguments title
Source
Card("Title") { Text("Content"); Button("Action") }Chart¶
kind: .bar|.line|.area|.pie|.donut|.scatter|.bubble|.radar|.heatmap|.funnel|.treemap|.gauge|.candlestick|.combo|.sparkline; values:/series:/labels:/points:/matrix:
role chart
Source
Chart(values: [3, 5, 2, 6, 4])CodeBlock¶
role code · arguments code · defaults lineNumbers: False
Source
CodeBlock("let total = items.count")CodeEditor¶
CodeEditor("…", language: "swift", lineNumbers:, highlight: [3], tabs: [..])
role code · arguments code
Source
CodeEditor("let total = items.count")Comment¶
author:, time:, avatar:
role message · arguments text · defaults variant: "comment"
Source
Comment("Text")ControlGroup¶
role toolbar · defaults variant: "group"
Source
ControlGroup() { Button("Save"); Button("Share") }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)])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") }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()ScrollView¶
role scroll · arguments axes
Source
ScrollView() { Text("Content"); Button("Action") }SearchField¶
role textfield · arguments placeholder · defaults kind: "search"
Source
SearchField("Placeholder")Section¶
Section("Header") { … } footer: { … }
role section · arguments title
Source
Section("Title") { Text("First item"); Text("Second item") }SecureField¶
role textfield · arguments placeholder · defaults kind: "password"
Source
SecureField("Placeholder")SegmentedControl¶
role segmented · arguments items
Source
SegmentedControl(["One", "Two", "Three"])SelectionRect¶
a drag-selection rectangle; size with .frame, place with .position
role marquee
Source
SelectionRect()Sheet¶
role dialog · arguments title · defaults variant: "sheet"
Source
Sheet("Title") { Text("Content"); Button("Action") }Sidebar¶
role sidebar · arguments title
Source
Sidebar("Title") { Text("Content"); Button("Action") }Skeleton¶
lines:, avatar:, image:, shape: .circle|.rectangle|.text
role skeleton
Source
Skeleton().frame(width: 160, height: 96)Sparkline¶
role chart · arguments values · defaults kind: "sparkline"
Source
Sparkline([3, 5, 2, 6, 4], values: [3, 5, 2, 6, 4])Spreadsheet¶
rows: [[…]], selection: "B2:C4", active:, formula:, sheets: [..], highlight: ["B3": .yellow]
role spreadsheet
| A | B | |
|---|---|---|
| 1 | A | B |
| 2 | 1 | 2 |
| 3 | 3 | 4 |
Source
Spreadsheet(columns: ["A", "B"], rows: [[1, 2], [3, 4]])Stat¶
Stat("Revenue", "$48k", change: "+12%", trend: [..], systemImage:)
role stat · arguments label, value
Source
Stat("Label", 60)Steps¶
role steps · arguments steps
Source
Steps(["Cart", "Shipping", "Payment"])StickyNote¶
StickyNote("Call Ana", color: .yellow, rotation: -2, author:)
role stickynote · arguments text
Source
StickyNote("Text")TabView¶
Children with .tabItem { Label } or Tab(…)
role tabs · defaults placement: "bottom"
Source
TabView() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }Table¶
columns: ["Name", …], rows: [[…], …] or TableRow children
role table
| Name | Status |
|---|---|
| Ana Lima | Active |
| Ben Okafor | Away |
Source
Table(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])Tabs¶
role tabs · arguments items · defaults placement: "top"
Source
Tabs(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }Terminal¶
lines starting with "$ " are commands
role code · arguments code · defaults variant: "terminal"
Source
Terminal("let total = items.count")Text¶
Text with bold, italic, code Markdown
role text · arguments content
Source
Text("Content")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") }