Skip to content

Ant Design

Imitates: Ant Design (antd) + ProComponents · React, default token theme v5 · Pack id: antd · Selected by: pack="antd", import Antd, import AntDesign, import ProComponents · Default device: desktop (browser chrome)

150 own elements, plus 101 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

Alert

Alert(message: "Saved", description: "…", type: "success"|"info"|"warning"|"error", showIcon: true, closable: true, action: { … })

role alert · arguments title · defaults showIcon: False · variants default, banner

default
banner
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Alert("Title").variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Alert("Title").variant("banner"); Text("banner").font(.caption).foregroundStyle(.secondary) }
}

Anchor

Anchor { AnchorLink("Basic") … } — in-page nav with the ink rail

role list

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

role listitem · arguments title

Title
Source
AnchorLink("Title")

App

App wrapper (renders its content)

role group

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

AutoComplete

AutoComplete("Search…", value:, options: [..], open: true)

role select · arguments placeholder

Placeholder
Source
AutoComplete("Placeholder")

Avatar

Avatar("Ana Lima", src: "…", icon: "UserOutlined", shape: "square", size: "small"|"large")

role avatar · arguments name · variants circle, square

ALcircle
ALsquare
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Avatar("Ana Lima").variant("circle"); Text("circle").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Avatar("Ana Lima").variant("square"); Text("square").font(.caption).foregroundStyle(.secondary) }
}

AvatarGroup

Avatar.Group { Avatar … } — overlapped avatars with white rings

role hstack · defaults spacing: 0

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

Badge

Badge(count: 5) { Avatar(…) } · Badge(dot: true) · Badge(status: "success", text: "Running") · overflowCount: 99

role badge · arguments count

3
Source
Badge(3)

BadgeRibbon

Badge.Ribbon(text: "Recommended", color: "volcano") { Card(…) } — corner ribbon over its child

role badge · arguments text · defaults variant: "ribbon"

Text
Source
BadgeRibbon("Text")

Breadcrumb(["Home", "Orders", "Detail"]) — "/" separators

role breadcrumb · arguments items

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

Button

Button("Save", type: "primary", icon: "SaveOutlined", size: "small"|"large", shape: "circle"|"round") · .danger() · v5.21 color:/variant: ("solid", "outlined", "dashed", "filled", "text", "link")

role button · arguments label · defaults variant: "default" · variants primary, default, dashed, text, link, solid, outlined, filled

Labelprimary
Labeldefault
Labeldashed
Labeltext
Labellink
Labelsolid
Labeloutlined
Labelfilled
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("primary"); Text("primary").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("dashed"); Text("dashed").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("text"); Text("text").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("link"); Text("link").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("solid"); Text("solid").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("outlined"); Text("outlined").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("filled"); Text("filled").font(.caption).foregroundStyle(.secondary) }
}

ButtonGroup

Joined buttons (Space.Compact of Buttons)

role toolbar · defaults variant: "group"

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

Calendar

Calendar(value: "2026-11-24", fullscreen: false)

role calendar

November 2026
SuMoTuWeThFrSa12345678910111213141516171819202122232425262728293012345
Source
Calendar()

Card

Card(title: "Orders", extra: { Link("More") }, size: "small", cover: "…", hoverable:) { … } actions: { Icon(…) … }

role card · arguments title · variants outlined, borderless

Title
ContentAction
outlined
Title
ContentAction
borderless
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Card("Title") { Text("Content"); Button("Action") }.variant("outlined"); Text("outlined").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Card("Title") { Text("Content"); Button("Action") }.variant("borderless"); Text("borderless").font(.caption).foregroundStyle(.secondary) }
}

CardGrid

Card.Grid — a hoverable cell of a grid card

role vstack

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

CardMeta

Card.Meta(title:, description:, avatar:)

role listitem · arguments title

Title
Source
CardMeta("Title")

Carousel(image: "…") — one slide with dots

role media · arguments image

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

Cascader

Cascader(value: "Asia / Japan / Tokyo", options: ["Asia", "Europe"], open: true)

role select · arguments placeholder

Placeholder
Source
Cascader("Placeholder")

CheckCard

CheckCard(title:, description:, avatar:, checked: true)

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

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

CheckableTag

Tag.CheckableTag("Movies", checked: true)

role chip · arguments label · defaults variant: "checkable"

Label
Source
CheckableTag("Label")

Checkbox

Checkbox("Remember me", checked: true) · checked: "indeterminate"

role checkbox · arguments label

Label
Source
Checkbox("Label")

CheckboxGroup

Checkbox.Group { Checkbox … } — a row of checkboxes (spacing 8)

role hstack · defaults spacing: 8

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

Col

Col(span: 6) — spans 1…24 columns of its Row

role vstack · defaults alignment: "stretch"

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

Collapse

Collapse { CollapsePanel("Header", expanded: true) { … } … } · bordered: false · ghost: true

role vstack · defaults alignment: "stretch", spacing: 0 · variants default, borderless, ghost

ContentAction
default
ContentAction
borderless
ContentAction
ghost
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Collapse() { Text("Content"); Button("Action") }.variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Collapse() { Text("Content"); Button("Action") }.variant("borderless"); Text("borderless").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Collapse() { Text("Content"); Button("Action") }.variant("ghost"); Text("ghost").font(.caption).foregroundStyle(.secondary) }
}

CollapsePanel

Collapse panel; extra: { … } on the right

role accordion · arguments title

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

ColorPicker

ColorPicker(colors: ["#1677ff", …], selection: 0, label: "#1677FF")

role swatches

Source
ColorPicker()

Column

Table column header (alignment: .trailing)

role tablecolumn · arguments title

Source
Column("Title")

ConfigProvider

ConfigProvider wrapper (renders its content)

role group

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

Content

Layout.Content — the padded page body

role vstack · defaults alignment: "stretch"

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

DatePicker

DatePicker(value: "2026-11-24", placeholder: "Select date", open: true)

role datepicker · arguments placeholder · defaults format: "iso"

Placeholder
Source
DatePicker("Placeholder")

Descriptions

Descriptions(title: "User Info", column: 3, bordered: true, size: "small", extra: { … }) { DescriptionsItem("Name", "Ana") … }

role section · arguments title

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

DescriptionsItem

DescriptionsItem("Status") { Badge(status:, text:) } · span: 2

role labeled · arguments label, value

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

DirectoryTree

role tree · defaults variant: "directory"

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

Divider

Divider() · Divider(label: "Text", orientation: "left") · type: "vertical" · dashed: true

role divider · variants solid, dashed, dotted

solid
dashed
dotted
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Divider().variant("solid"); Text("solid").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Divider().variant("dashed"); Text("dashed").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Divider().variant("dotted"); Text("dotted").font(.caption).foregroundStyle(.secondary) }
}

Dragger

Alias of UploadDragger

role dropzone · arguments label · defaults icon: "InboxOutlined"

Label
Source
Dragger("Label")

Drawer

Drawer(title: "Order #1024", placement: .right, width: 420) { … } footer: { Button … }

role dialog · arguments title · defaults closable: True, variant: "drawer"

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

Dropdown("Actions", open: true) { DropdownItem("Edit", icon:); MenuDivider(); DropdownItem("Delete", danger: true) }

role menu · arguments label

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

Dropdown.Button — a button with a separate caret

role menu · arguments label · defaults variant: "default"

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

Item of a Dropdown menu; danger: true, extra: "⌘E"

role menuitem · arguments label

Source
DropdownItem("Label")

Empty

Empty("No orders yet") { Button("Create", type: "primary") } · image: "simple"

role emptystate · arguments description · defaults description: "No data", icon: "tray" · variants default, simple

No data
default
No data
simple
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Empty().variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Empty().variant("simple"); Text("simple").font(.caption).foregroundStyle(.secondary) }
}

Flex

Flex(gap: 16, vertical: true, justify:, align:, wrap: true) { … }

role hstack

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

FloatButton

FloatButton(icon: "QuestionCircleOutlined", type: "primary", description: "HELP") — floats bottom-right

role fab · arguments icon · defaults variant: "default" · variants default, primary

default
primary
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { FloatButton("star").variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { FloatButton("star").variant("primary"); Text("primary").font(.caption).foregroundStyle(.secondary) }
}

Layout.Footer — centered secondary text

role hstack

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

FooterToolbar

FooterToolbar { Button … } — the fixed bottom action bar

role toolbar · defaults variant: "footer"

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

Form

Form(layout: "horizontal"|"vertical"|"inline") { FormItem(…) { … } · Input(label:) … } — horizontal puts right-aligned labels with a colon left

role form · defaults variant: "horizontal" · variants horizontal, vertical, inline

Name
Notifications
horizontal
Name
Notifications
vertical
Name
Notifications
inline
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Form() { TextField("Name"); Toggle("Notifications", isOn: true) }.variant("horizontal"); Text("horizontal").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Form() { TextField("Name"); Toggle("Notifications", isOn: true) }.variant("vertical"); Text("vertical").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Form() { TextField("Name"); Toggle("Notifications", isOn: true) }.variant("inline"); Text("inline").font(.caption).foregroundStyle(.secondary) }
}

FormItem

FormItem("Notifications", required: true, help: "…") { Switch() } — label + any control

role labeled · arguments label

LabelContentAction
Source
FormItem("Label") { Text("Content"); Button("Action") }

GridContent

role vstack · defaults alignment: "stretch", spacing: 24

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

Layout.Header — 64 px bar, #001529 (theme: "light" for white); children go to the right

role appbar · arguments title · defaults variant: "dark" · variants dark, light

dark
light
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Header("Title") { Text("Content"); Button("Action") }.variant("dark"); Text("dark").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Header("Title") { Text("Content"); Button("Action") }.variant("light"); Text("light").font(.caption).foregroundStyle(.secondary) }
}

Icon

Ant icon by component name: Icon("SettingOutlined")

role icon · arguments name

Source
Icon("star")

Image

Image(src: "…", width: …)

role image · arguments src

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

Input

Input("Email", label: "Email", value:, prefix:, suffix:, addonBefore: "https://", allowClear: true, status: "error", size:)

role textfield · arguments placeholder · variants outlined, filled, borderless, underlined

Placeholder
outlined
Placeholder
filled
Placeholder
borderless
Placeholder
underlined
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Input("Placeholder").variant("outlined"); Text("outlined").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Input("Placeholder").variant("filled"); Text("filled").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Input("Placeholder").variant("borderless"); Text("borderless").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Input("Placeholder").variant("underlined"); Text("underlined").font(.caption).foregroundStyle(.secondary) }
}

InputNumber

InputNumber(value: 3, min: 1, max: 10, addonAfter: "kg")

role textfield · arguments placeholder · defaults kind: "number", trailingIcon: "chevron.up.down"

Placeholder
Source
InputNumber("Placeholder")

InputOTP

Input.OTP(items: ["4", "8", "1", "", "", ""])

role segmented · arguments items · defaults variant: "otp"

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

InputPassword

Input.Password with the eye toggle

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

Placeholder
Source
InputPassword("Placeholder")

InputSearch

Input.Search("Search orders", enterButton: true)

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

Placeholder
Source
InputSearch("Placeholder")

Kbd

role kbd · arguments keys

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

Layout

Layout { Header; Layout { Sider; Content }; Footer } — colorBgLayout background; hasSider: true for a row

role vstack · defaults alignment: "stretch", spacing: 0

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

LayoutHeader

Alias of Header

role appbar · arguments title · defaults variant: "dark"

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

LightFilter

LightFilter { Select(…, variant: "borderless") … } — compact inline filters

role hstack · defaults spacing: 8

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

List

List(header: "Activity", bordered: true, size: "small") { ListItem(…) } · itemLayout: "vertical"

role list · variants default, bordered, split

First item
Second item
default
First item
Second item
bordered
First item
Second item
split
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { List() { Text("First item"); Text("Second item") }.variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { List() { Text("First item"); Text("Second item") }.variant("bordered"); Text("bordered").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { List() { Text("First item"); Text("Second item") }.variant("split"); Text("split").font(.caption).foregroundStyle(.secondary) }
}

ListItem

List.Item with Meta: ListItem("Title", description: "…", avatar: "Ana") actions: { Link("edit") }

role listitem · arguments title

Title
Source
ListItem("Title")

ListItemMeta

role listitem · arguments title

Title
Source
ListItemMeta("Title")

Mentions

Mentions — a TextArea that suggests @names

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

Placeholder
Source
Mentions("Placeholder")

Menu(mode: "inline"|"vertical"|"horizontal", theme: "dark", selection: "Orders") { MenuItem(…); SubMenu(…) { … } }

role sidebar · defaults variant: "light" · variants light, dark

light
dark
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Menu() { Text("Content"); Button("Action") }.variant("light"); Text("light").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Menu() { Text("Content"); Button("Action") }.variant("dark"); Text("dark").font(.caption).foregroundStyle(.secondary) }
}

role divider

Source
MenuDivider()

MenuItem("Orders", icon: "ShoppingCartOutlined").selected() · danger via .badge / DropdownItem

role navitem · arguments label

Label
Source
MenuItem("Label")

Menu.ItemGroup — grey caption above a group of items

role section · arguments title

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

Message

message.success(…): Message("Saved successfully", type: "success") — a small card at the top centre

role toast · arguments message · defaults icon: "InfoCircleFilled", position: "top", variant: "info" · variants info, success, error, warning, loading

info
success
error
warning
loading
Message
Message
Message
Message
Message
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Message("Message").variant("info"); Text("info").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Message("Message").variant("success"); Text("success").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Message("Message").variant("error"); Text("error").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Message("Message").variant("warning"); Text("warning").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Message("Message").variant("loading"); Text("loading").font(.caption).foregroundStyle(.secondary) }
}

Modal(title: "Basic Modal", open: true) { … } footer: { Button("Cancel"); Button("OK", type: "primary") } · buttons: ["Cancel", "OK"]

role dialog · arguments title · defaults closable: True

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

ModalConfirm

Modal.confirm(title:, content:, buttons: ["Cancel", "Delete"], destructive: "Delete") — icon left, buttons bottom-right

role dialog · arguments title · defaults buttons: ["Cancel", "OK"], icon: "ExclamationCircleFilled", variant: "confirm"

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

Notification

notification.open: Notification(message: "New order", description: "…", type: "success", icon:) — top-right card

role toast · arguments message · defaults closable: True, position: "topRight", variant: "notification"

Message
Source
Notification("Message")

PageContainer

PageContainer(title: "Basic list", subtitle:) header: { Breadcrumb([..]) } extra: { Button … } { content }

role card · arguments title

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

PageHeader(title:, subTitle:, onBack: true) extra: { … }

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

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

Pagination

Pagination(total: 85, current: 2, showTotal: "Total 85 items", pageSize: 10, size: "small") — count is pages

role pagination · variants default, simple, mini

default
simple
mini
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Pagination().variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Pagination().variant("simple"); Text("simple").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Pagination().variant("mini"); Text("mini").font(.caption).foregroundStyle(.secondary) }
}

Panel

role accordion · arguments title

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

Paragraph

Typography.Paragraph — body text with 1em bottom margin; type: "secondary"

role text · arguments content

Content
Source
Paragraph("Content")

Password

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

Placeholder
Source
Password("Placeholder")

Popconfirm

Popconfirm(title: "Delete the task", description: "Are you sure?") { Button(…) } actions: { … }

role tooltip · arguments title

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

Popover

Popover(title: "Title", content: "…") { Button(…) } — white card bubble

role tooltip · arguments title

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

ProCard

ProCard(title: "Trend", extra: { … }, bordered: true, headerBordered: true, split: "vertical") { … }

role card · arguments title · variants default, inner

Title
ContentAction
default
Title
ContentAction
inner
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { ProCard("Title") { Text("Content"); Button("Action") }.variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ProCard("Title") { Text("Content"); Button("Action") }.variant("inner"); Text("inner").font(.caption).foregroundStyle(.secondary) }
}

ProDescriptions

ProDescriptions(title:, column: 2) { DescriptionsItem … }

role section · arguments title

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

ProForm

ProForm(layout: "vertical") { ProFormText(…) … } actions: { Button("Submit", type: "primary") }

role form · defaults variant: "vertical" · variants horizontal, vertical, inline

Name
Notifications
horizontal
Name
Notifications
vertical
Name
Notifications
inline
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { ProForm() { TextField("Name"); Toggle("Notifications", isOn: true) }.variant("horizontal"); Text("horizontal").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ProForm() { TextField("Name"); Toggle("Notifications", isOn: true) }.variant("vertical"); Text("vertical").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ProForm() { TextField("Name"); Toggle("Notifications", isOn: true) }.variant("inline"); Text("inline").font(.caption).foregroundStyle(.secondary) }
}

ProFormCheckbox

role checkbox · arguments label

Label
Source
ProFormCheckbox("Label")

ProFormDatePicker

role datepicker · arguments label · defaults format: "iso"

Source
ProFormDatePicker("Label")

ProFormDateRangePicker

role datepicker · arguments label · defaults format: "iso", kind: "range"

Source
ProFormDateRangePicker("Label")

ProFormDigit

role textfield · arguments label · defaults kind: "number", trailingIcon: "chevron.up.down"

Source
ProFormDigit("Label")

ProFormPassword

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

Source
ProFormPassword("Label")

ProFormRadioGroup

role radiogroup · arguments label · defaults orientation: "horizontal"

Label
FirstSecond
Source
ProFormRadioGroup("Label") { Radio("First", selected: true); Radio("Second") }

ProFormSelect

ProFormSelect("Status", options: [..], value:)

role select · arguments label

Source
ProFormSelect("Label")

ProFormSwitch

role toggle · arguments label

Label
Source
ProFormSwitch("Label")

ProFormText

ProFormText("Name", placeholder:, required: true, width: "md")

role textfield · arguments label

Source
ProFormText("Label")

ProFormTextArea

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

Source
ProFormTextArea("Label")

ProFormUploadDragger

role dropzone · arguments label · defaults icon: "InboxOutlined"

Label
Source
ProFormUploadDragger("Label")

ProHeader

ProLayout global header (56 px): ProHeader(title:, search:, notifications: 3, avatar: "Serati Ma") { actions }

role appbar · arguments title · defaults variant: "pro"

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

ProLayout

ProLayout(layout: "side"|"mix"|"top") { ProSider(…) { MenuItem … }; VStack { ProHeader(…); PageContainer(…) { … } } }

role hstack · defaults alignment: "stretch", spacing: 0

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

ProList

ProList(headerTitle: "Members") { ListItem … }

role list

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

ProSider

ProLayout side menu with logo + title header: ProSider(title: "Ant Design Pro", logo: …)

role sidebar · arguments title · defaults variant: "light"

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

ProTable

ProTable(headerTitle: "Orders", columns:, rows:, rowSelection: true) toolbar: { Button(…) } footer: { Pagination(…) }

role table · variants default, bordered

NameStatus
Ana LimaActive
Ben OkaforAway
default
NameStatus
Ana LimaActive
Ben OkaforAway
bordered
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { ProTable(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]]).variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ProTable(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]]).variant("bordered"); Text("bordered").font(.caption).foregroundStyle(.secondary) }
}

Progress

Progress(percent: 30, type: "circular", status: "exception"|"success"|"active", size: "small", strokeColor:, showInfo: false)

role progress · arguments percent · defaults showValue: True · variants line, circle, dashboard

60%
line
60%
circle
60%
dashboard
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Progress(60).variant("line"); Text("line").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Progress(60).variant("circle"); Text("circle").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Progress(60).variant("dashboard"); Text("dashboard").font(.caption).foregroundStyle(.secondary) }
}

QRCode

QRCode(value:) — a QR placeholder

role placeholder · arguments label · defaults icon: "square.grid.3x3"

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

QueryFilter

QueryFilter { ProFormText(…) … } actions: { Button("Reset"); Button("Query", type: "primary") } — the 3-column search form above a ProTable

role form · defaults variant: "query"

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

Radio

role radio · arguments label

Label
Source
Radio("Label")

RadioButton

role radio · arguments label

Label
Source
RadioButton("Label")

RadioGroup

Radio.Group(options: ["Daily", "Weekly"], value: "Weekly", optionType: "button", buttonStyle: "solid")

role radiogroup · arguments label · defaults orientation: "horizontal" · variants default, button, solid

Label
FirstSecond
default
Label
FirstSecond
button
Label
FirstSecond
solid
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { RadioGroup("Label") { Radio("First", selected: true); Radio("Second") }.variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { RadioGroup("Label") { Radio("First", selected: true); Radio("Second") }.variant("button"); Text("button").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { RadioGroup("Label") { Radio("First", selected: true); Radio("Second") }.variant("solid"); Text("solid").font(.caption).foregroundStyle(.secondary) }
}

RangePicker

DatePicker.RangePicker(value: "2026-11-01 → 2026-11-30")

role datepicker · arguments placeholder · defaults format: "iso", kind: "range"

Placeholder
Source
RangePicker("Placeholder")

Rate

Rate(value: 3.5, count: 5)

role rating · arguments value

Source
Rate(60)

Result

Result(status: "success", title: "Successfully Purchased!", subTitle: "Order 2017…") { Button("Go Console", type: "primary") }

role emptystate · arguments title · defaults icon: "checkmark.circle", kind: "success" · variants success, error, info, warning, 404, 403, 500

Title
success
Title
error
Title
info
Title
warning
Title
404
Title
403
Title
500
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Result("Title").variant("success"); Text("success").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Result("Title").variant("error"); Text("error").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Result("Title").variant("info"); Text("info").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Result("Title").variant("warning"); Text("warning").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Result("Title").variant("404"); Text("404").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Result("Title").variant("403"); Text("403").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Result("Title").variant("500"); Text("500").font(.caption).foregroundStyle(.secondary) }
}

Row

Row(gutter: 16) { Col(span: 8) { … } … } — the 24-column grid

role grid · defaults columns: 24

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

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

Placeholder
Source
Search("Placeholder")

Segmented

Segmented(options: ["Daily", "Weekly", "Monthly"], value: "Weekly", block: true, size:)

role segmented · arguments options

OneTwo
Source
Segmented(["One", "Two"])

Select

Select("Status", value: "Active", options: [..], open: true) · mode: "multiple" with value: [..] renders tags

role select · arguments placeholder · variants outlined, filled, borderless, underlined

Placeholder
outlined
Placeholder
filled
Placeholder
borderless
Placeholder
underlined
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Select("Placeholder").variant("outlined"); Text("outlined").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Select("Placeholder").variant("filled"); Text("filled").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Select("Placeholder").variant("borderless"); Text("borderless").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Select("Placeholder").variant("underlined"); Text("underlined").font(.caption).foregroundStyle(.secondary) }
}

Sider

Layout.Sider(width: 200, theme: "light", collapsed: true) { MenuItem … }

role sidebar · arguments title · defaults variant: "dark" · variants dark, light

dark
light
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Sider("Title") { Text("Content"); Button("Action") }.variant("dark"); Text("dark").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Sider("Title") { Text("Content"); Button("Action") }.variant("light"); Text("light").font(.caption).foregroundStyle(.secondary) }
}

Skeleton

Skeleton(avatar: true, lines: 3, active: true)

role skeleton

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

Slider

Slider(value: 30) · range: value: [20, 50] · marks via ticks: 4

role slider

Source
Slider()

Space

Space(size: "small"|"middle"|"large", direction: "vertical") { … } — 8/16/24 px gaps

role hstack

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

SpaceCompact

Space.Compact { Input(…); Button(…) } — joined controls

role toolbar · defaults variant: "group"

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

Spin

Spin(tip: "Loading…", size: "large")

role progress · arguments label · defaults kind: "spinner"

Label
Source
Spin("Label")

Statistic

Statistic(title: "Active Users", value: "112,893", change: "+11.28%", prefix:/suffix: via value text)

role stat · arguments title, value

Title
60
Source
Statistic("Title", 60)

StatisticCard

StatisticCard(title: "Sales", value: "¥ 126,560", change: "12%", caption: "week over week", trend: [..])

role stat · arguments title, value

Title
60
Source
StatisticCard("Title", 60)

StatisticCountdown

Statistic.Countdown(title:, value: "23:59:59")

role stat · arguments title, value

Title
60
Source
StatisticCountdown("Title", 60)

Steps

Steps(items: ["Login", ["title": "Verify", "description": "…"], "Done"], current: 1, direction: "vertical", size: "small") · errors: [1]

role steps · arguments items · variants default, navigation, inline, dot

1One
2Two
3Three
default
1One
2Two
3Three
navigation
1One
2Two
3Three
inline
1One
2Two
3Three
dot
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Steps(["One", "Two", "Three"]).variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Steps(["One", "Two", "Three"]).variant("navigation"); Text("navigation").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Steps(["One", "Two", "Three"]).variant("inline"); Text("inline").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Steps(["One", "Two", "Three"]).variant("dot"); Text("dot").font(.caption).foregroundStyle(.secondary) }
}

StepsForm

StepsForm { Steps(…); ProForm { … } }

role vstack · defaults alignment: "stretch", spacing: 24

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

SubMenu("Settings", icon:, expanded: true) { MenuItem … }

role navitem · arguments label

Label
Source
SubMenu("Label")

Switch

Switch(checked: true, checkedChildren: "ON", size: "small", loading:)

role toggle · arguments label

Label
Source
Switch("Label")

TabPane

TabPane("Details", icon:) { panel }

role tab · arguments label

Source
TabPane("Label")

Table

Table(columns: [..], rows: [[..]], rowSelection: true, selectedRows: [1], sortColumn: 2, size: "middle"|"small", bordered: true, pagination: "…") — cells may be views

role table · variants default, bordered

NameStatus
Ana LimaActive
Ben OkaforAway
default
NameStatus
Ana LimaActive
Ben OkaforAway
bordered
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Table(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]]).variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Table(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]]).variant("bordered"); Text("bordered").font(.caption).foregroundStyle(.secondary) }
}

Tabs

Tabs(items: ["Overview", "Logs"], selection: 0, type: "card", size: "small") or Tabs { TabPane("One") { … } }

role tabs · arguments items · defaults placement: "top" · variants line, card, editable-card

OneTwo
First tab
line
OneTwo
First tab
card
OneTwo
First tab
editable-card
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Tabs(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }.variant("line"); Text("line").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Tabs(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }.variant("card"); Text("card").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Tabs(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }.variant("editable-card"); Text("editable-card").font(.caption).foregroundStyle(.secondary) }
}

TabsItem

role tab · arguments label

Source
TabsItem("Label")

Tag

Tag("processing", color: "blue"|"success"|"processing"|"error"|"warning"|"magenta"…, icon:, closable: true, bordered: false)

role chip · arguments label · variants filled, outlined, solid, borderless

Labelfilled
Labeloutlined
Labelsolid
Labelborderless
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Tag("Label").variant("filled"); Text("filled").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Tag("Label").variant("outlined"); Text("outlined").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Tag("Label").variant("solid"); Text("solid").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Tag("Label").variant("borderless"); Text("borderless").font(.caption).foregroundStyle(.secondary) }
}

Text

Typography.Text: Text("Note", type: "secondary"|"success"|"warning"|"danger") · .strong() .code() .mark() .keyboard() .delete() .underline()

role text · arguments content · variants secondary, success, warning, danger

Contentsecondary
Contentsuccess
Contentwarning
Contentdanger
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Text("Content").variant("secondary"); Text("secondary").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Text("Content").variant("success"); Text("success").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Text("Content").variant("warning"); Text("warning").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Text("Content").variant("danger"); Text("danger").font(.caption).foregroundStyle(.secondary) }
}

TextArea

Input.TextArea(rows: 4, showCount: true, maxLength: 100)

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

Placeholder
Source
TextArea("Placeholder")

TimePicker

role datepicker · arguments placeholder · defaults kind: "time"

Placeholder
Source
TimePicker("Placeholder")

Timeline

Timeline { TimelineItem("Created", color: "green", label: "2026-11-01") … } · pending:

role timeline · variants left, alternate, right

Created
Shipped
left
Created
Shipped
alternate
Created
Shipped
right
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Timeline() { TimelineItem("Created"); TimelineItem("Shipped") }.variant("left"); Text("left").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Timeline() { TimelineItem("Created"); TimelineItem("Shipped") }.variant("alternate"); Text("alternate").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Timeline() { TimelineItem("Created"); TimelineItem("Shipped") }.variant("right"); Text("right").font(.caption).foregroundStyle(.secondary) }
}

TimelineItem

TimelineItem("Shipped", color: "green"|"blue"|"red"|"gray", description:, dot: "ClockCircleOutlined")

role timelineitem · arguments title

Title
Source
TimelineItem("Title")

Title

Title("Dashboard", level: 3) — Typography.Title h1–h5 (38/30/24/20/16 px)

role text · arguments content · defaults level: 1

Content
Source
Title("Content")

Tooltip

Tooltip("prompt text", placement: .bottom) { Button(…) }

role tooltip · arguments title

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

Tour

Tour step bubble: Tour("Upload file", description: "…") { target }

role tooltip · arguments title

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

Transfer

Transfer { TransferList("Source") { … }; TransferOperation(); TransferList("Target") { … } }

role hstack · defaults alignment: "center", spacing: 8

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

TransferItem

role listitem · arguments title · defaults checked: False

Title
Source
TransferItem("Title")

TransferList

TransferList("Source", subtitle: "2/8 items") { TransferItem("Content 1", checked: true) }

role card · arguments title

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

TransferOperation

The two arrow buttons between TransferLists (pass children to override)

role vstack · defaults spacing: 4

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

Tree

Tree { TreeNode("parent", expanded: true) { TreeNode("leaf") } } · showLine · checkable

role tree · variants default, directory

Folder
File
default
Folder
File
directory
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Tree() { TreeItem("Folder") { TreeItem("File") } }.variant("default"); Text("default").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Tree() { TreeItem("Folder") { TreeItem("File") } }.variant("directory"); Text("directory").font(.caption).foregroundStyle(.secondary) }
}

TreeNode

TreeNode("src", folder: true, expanded: true, checked: true).selected()

role treeitem · arguments title

Title
Source
TreeNode("Title")

TreeSelect

TreeSelect(value: "Engineering / Platform", options: [..])

role select · arguments placeholder

Placeholder
Source
TreeSelect("Placeholder")

Typography

Typography("Body text") — plain text container

role text · arguments content

Content
Source
Typography("Content")

TypographyText

Alias of Text

role text · arguments content

Content
Source
TypographyText("Content")

Upload

Upload { Button("Click to Upload", icon: "UploadOutlined"); UploadFile("spec.pdf") } — trigger + file list

role vstack · defaults alignment: "leading", spacing: 8

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

UploadDragger

Upload.Dragger("Click or drag file to this area to upload", hint: "Support for a single or bulk upload.")

role dropzone · arguments label · defaults icon: "InboxOutlined"

Label
Source
UploadDragger("Label")

UploadFile

UploadFile("report.pdf", status: "uploading"|"done"|"error") — a row of the upload list

role listitem · arguments title · defaults icon: "PaperClipOutlined"

Title
Source
UploadFile("Title")

Watermark

Watermark wrapper (renders its content)

role group

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

Core vocabulary in this style

Accordion

role accordion · arguments title

Title
Source
Accordion("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)

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

BubbleChart

role chart · defaults kind: "bubble"

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

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

Canvas

free-form area; place children with .position(x:y:); grid: .dots|.lines

role canvas

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

Capsule

role shape · defaults shape: "capsule"

Source
Capsule().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])

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

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

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

Grid

Grid of GridRow children, or columns: n

role grid

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

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

IconButton

role button · arguments icon · defaults iconOnly: True

Source
IconButton("star")

KanbanCard

title, description:, tags: [..], assignees: [..], due:, comments:, priority:

role kanbancard · arguments title

Title
Source
KanbanCard("Title")

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

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

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

role navstack

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

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

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)

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()

ScrollView

role scroll · arguments axes

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

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

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

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

TabView

Children with .tabItem { Label } or Tab(…)

role tabs · defaults placement: "bottom"

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

TableColumn

role tablecolumn · arguments title

Source
TableColumn("Title")

TableRow

role tablerow

Source
TableRow()

Terminal

lines starting with "$ " are commands

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

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

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

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

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