Skip to content

Material UI

Imitates: Material UI (MUI Core + MUI X) · React, default theme v9 · Pack id: mui · Selected by: pack="mui", import MaterialUI, import MUI · Default device: desktop (browser chrome)

116 own elements, plus 96 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

Accordion

Accordion("General settings", subtitle:, expanded: true) { details }

role accordion · arguments title

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

AccordionDetails

role vstack · defaults alignment: "stretch"

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

Alert

Alert("Saved", severity: "info", title: "Info", variant: "filled", closable: true)

role alert · arguments message · defaults severity: "success", variant: "standard" · variants standard, filled, outlined

standard
filled
outlined
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Alert("Message").variant("standard"); Text("standard").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Alert("Message").variant("filled"); Text("filled").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Alert("Message").variant("outlined"); Text("outlined").font(.caption).foregroundStyle(.secondary) }
}

AlertTitle

Bold first line inside an Alert

role text · arguments content

Content
Source
AlertTitle("Content")

AppBar

AppBar(title: "Dashboard", menu: true, avatar: "Ana", search: "Search…") { IconButton(…) } · color: "default"

role appbar · arguments title · variants elevation, outlined, dense

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

Autocomplete

Autocomplete("Movie", value: "Inception") · value: [..] renders chips (multiple)

role select · arguments label · defaults variant: "outlined"

Source
Autocomplete("Label")

Avatar

Avatar("Remy Sharp", image: "…") · variant: "rounded"

role avatar · arguments name · variants circular, rounded, square

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

AvatarGroup

AvatarGroup { Avatar(…) … } — overlapped avatars

role hstack

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

Backdrop

Backdrop { CircularProgress() }

role dialog · defaults variant: "backdrop"

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

Badge

Badge(4, color: "error") { SvgIcon("mail") } — or .badge(4) on IconButton/Tab/ListItem

role badge · arguments content · variants standard, dot

Contentstandard
Contentdot
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Badge("Content").variant("standard"); Text("standard").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Badge("Content").variant("dot"); Text("dot").font(.caption).foregroundStyle(.secondary) }
}

BarChart

MUI X BarChart(series: [[..], [..]], labels: [..], height: 200)

role chart · defaults kind: "bar"

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

BottomNavigation

BottomNavigation(value: 0) { BottomNavigationAction("Recents", icon: "restore") … }

role tabs · defaults placement: "bottom"

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

BottomNavigationAction

role tab · arguments label

Source
BottomNavigationAction("Label")

Box

Generic container (a column that stretches its children)

role vstack · defaults alignment: "stretch"

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

Breadcrumbs(["Home", "Catalog", "Shoes"]) or Link children

role breadcrumb · arguments items

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

Button

Button("Save", variant: "contained", color: "secondary", size: "small", startIcon: "send")

role button · arguments label · defaults variant: "text" · variants text, outlined, contained

Labeltext
Labeloutlined
Labelcontained
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("text"); Text("text").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("contained"); Text("contained").font(.caption).foregroundStyle(.secondary) }
}

ButtonGroup

ButtonGroup(variant: "contained") { Button("One") … }

role toolbar · defaults variant: "outlined" · variants contained, outlined, text

contained
outlined
text
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { ButtonGroup() { Button("Save"); Button("Share") }.variant("contained"); Text("contained").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ButtonGroup() { Button("Save"); Button("Share") }.variant("outlined"); Text("outlined").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { ButtonGroup() { Button("Save"); Button("Share") }.variant("text"); Text("text").font(.caption).foregroundStyle(.secondary) }
}

Card

Card(title:, subheader:, avatar:, image:) { content } actions: { Button … } headerAction: { IconButton }

role card · arguments title · defaults elevation: 1 · variants elevation, outlined

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

CardActions

Row of small buttons at the bottom of a Card

role hstack

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

CardContent

16px-padded body of a Card

role vstack · defaults alignment: "stretch"

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

CardHeader

CardHeader(title:, subheader:, avatar:) action: { … }

role card · arguments title

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

CardMedia

CardMedia("photo.svg") — 140px cover image (or Card(image:))

role image · arguments src

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

Checkbox

Checkbox("Remember me", checked: true, color:)

role checkbox · arguments label

Label
Source
Checkbox("Label")

Chip

Chip("Active", color: "success", variant: "outlined", onDelete: true, icon:, avatar:)

role chip · arguments label · defaults variant: "filled" · variants filled, outlined

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

CircularProgress

CircularProgress(value: 75, color:)

role progress · defaults kind: "circular"

Source
CircularProgress()

Collapse

role group

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

Container

Centered, max-width 1200 column with 24px gutters

role vstack · defaults alignment: "stretch"

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

DataGrid

MUI X DataGrid(columns:, rows:, checkboxSelection: true, selectedRows: [1], pagination: "…")

role table

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

DateCalendar

MUI X DateCalendar(value: "2026-11-23", showToday: true)

role calendar

November 2026
SuMoTuWeThFrSa12345678910111213141516171819202122232425262728293012345
Source
DateCalendar()

DatePicker

MUI X DatePicker("Start date", value: "2026-11-23")

role datepicker · arguments label · defaults format: "numeric", variant: "outlined"

Source
DatePicker("Label")

DateTimePicker

role datepicker · arguments label · defaults format: "numeric", kind: "datetime", variant: "outlined"

Source
DateTimePicker("Label")

Dialog

Dialog(title:, message:) { content } actions: { Button("Cancel") … }

role dialog · arguments title

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

DialogActions

Right-aligned row of dialog buttons

role hstack

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

DialogContent

role vstack · defaults alignment: "stretch"

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

DialogContentText

Secondary body text of a Dialog

role text · arguments content

Content
Source
DialogContentText("Content")

DialogTitle

Dialog heading (or use Dialog(title:))

role text · arguments content

Content
Source
DialogTitle("Content")

Divider

Divider(variant: "inset") · Divider(label: "OR")

role divider · variants fullWidth, inset, middle

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

Drawer

Drawer(title: "Acme") { ListItemButton("Inbox", icon: "inbox").selected() … } · variant: "temporary" floats over a backdrop

role sidebar · arguments title · defaults variant: "permanent" · variants permanent, persistent, temporary

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

Fab

Fab("add", color: "primary") · Fab("navigation", label: "Navigate", variant: "extended") — floats bottom-right; inline: true to place it

role fab · arguments icon · variants circular, extended

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

Fade

role group

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

FilledInput

role textfield · arguments placeholder · defaults variant: "filled"

Placeholder
Source
FilledInput("Placeholder")

FormControl

role vstack · defaults alignment: "stretch"

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

FormControlLabel

Checkbox with a label (use Switch(label) for a switch)

role checkbox · arguments label

Label
Source
FormControlLabel("Label")

FormGroup

Column of Checkbox / Switch controls; orientation: .horizontal for row

role vstack · defaults alignment: "leading"

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

FormHelperText

Caption under a control; error: true

role text · arguments content

Content
Source
FormHelperText("Content")

FormLabel

Label of a RadioGroup / FormGroup

role text · arguments content

Content
Source
FormLabel("Content")

Gauge

role progress · arguments value · defaults kind: "circular"

Source
Gauge(60)

Grid

Grid(spacing: 16) { Grid(size: 4) { … } } — 12-column grid, items span size:

role grid · arguments columns

ContentAction
Source
Grid(["Name", "Status"]) { Text("Content"); Button("Action") }

Grow

role group

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

IconButton

IconButton("delete", color: "primary", size: "small")

role button · arguments icon · defaults iconOnly: True

Source
IconButton("star")

ImageList

ImageList(columns: 3) { ImageListItem("photo.svg") … }

role grid · arguments columns

ContentAction
Source
ImageList(["Name", "Status"]) { Text("Content"); Button("Action") }

ImageListItem

role image · arguments src

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

Input

role textfield · arguments placeholder · defaults variant: "standard"

Placeholder
Source
Input("Placeholder")

InputBase

role textfield · arguments placeholder · defaults variant: "base"

Placeholder
Source
InputBase("Placeholder")

InputLabel

role text · arguments content

Content
Source
InputLabel("Content")

LineChart

role chart · defaults kind: "line"

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

LinearProgress

LinearProgress(value: 60) · no value = indeterminate

role progress · variants determinate, indeterminate, buffer, query

determinate
indeterminate
buffer
query
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { LinearProgress().variant("determinate"); Text("determinate").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { LinearProgress().variant("indeterminate"); Text("indeterminate").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { LinearProgress().variant("buffer"); Text("buffer").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { LinearProgress().variant("query"); Text("query").font(.caption).foregroundStyle(.secondary) }
}

role link · arguments label, href · variants always, hover, none

Labelalways
Labelhover
Labelnone
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Link("Label", "#").variant("always"); Text("always").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Link("Label", "#").variant("hover"); Text("hover").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Link("Label", "#").variant("none"); Text("none").font(.caption).foregroundStyle(.secondary) }
}

List

List { ListItem(…) … } · .dense() · List(header: "Folders")

role list

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

ListItem

ListItem("Inbox", secondary: "…", icon: "inbox", avatar: "Ana") { secondary action }

role listitem · arguments primary

Primary
Source
ListItem("Primary")

ListItemAvatar

Leading avatar of a ListItem

role avatar · arguments name

AL
Source
ListItemAvatar("Ana Lima")

ListItemButton

Clickable ListItem; .selected() tints it

role listitem · arguments primary

Primary
Source
ListItemButton("Primary")

ListItemIcon

Leading icon of a ListItem (56px column)

role icon · arguments name

Source
ListItemIcon("star")

ListItemText

ListItemText(primary:, secondary:) inside a ListItem

role listitem · arguments primary

Primary
Source
ListItemText("Primary")

ListSubheader

Section heading inside a List

role text · arguments content

Content
Source
ListSubheader("Content")

LoadingButton

Button with a progress spinner (Button loading:)

role button · arguments label · defaults loading: True, variant: "contained" · variants text, outlined, contained

Labeltext
Labeloutlined
Labelcontained
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { LoadingButton("Label").variant("text"); Text("text").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { LoadingButton("Label").variant("outlined"); Text("outlined").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { LoadingButton("Label").variant("contained"); Text("contained").font(.caption).foregroundStyle(.secondary) }
}

Masonry

role grid · arguments columns

ContentAction
Source
Masonry(["Name", "Status"]) { Text("Content"); Button("Action") }

Menu(icon: "more_vert", open: true) { MenuItem("Edit", icon: "edit") … }

role menu · arguments label

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

MenuItem("Profile", icon:, shortcut: "⌘P").selected()

role menuitem · arguments label

Source
MenuItem("Label")

A standalone menu surface

role menu

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

MobileStepper

MobileStepper(count: 4, page: 2) — dots with Back/Next

role pagination · variants dots, text, progress

dots
text
progress
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { MobileStepper().variant("dots"); Text("dots").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { MobileStepper().variant("text"); Text("text").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { MobileStepper().variant("progress"); Text("progress").font(.caption).foregroundStyle(.secondary) }
}

role dialog · arguments title

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

NativeSelect

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

Source
NativeSelect("Label")

OutlinedInput

role textfield · arguments placeholder · defaults variant: "outlined"

Placeholder
Source
OutlinedInput("Placeholder")

Pagination

Pagination(count: 10, page: 2, color: "primary", shape: "rounded")

role pagination · variants text, outlined

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

Paper

Paper(elevation: 3) { … } — surface with no padding; variant: "outlined"

role card · defaults elevation: 1 · variants elevation, outlined

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

PieChart

MUI X PieChart(values: [..], labels: [..])

role chart · defaults kind: "pie"

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

Placeholder

role placeholder · arguments label

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

Popover

role menu · arguments label

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

Radio

role radio · arguments label

Label
Source
Radio("Label")

RadioGroup

RadioGroup("Gender", options: [..], value: "Female") · orientation: .horizontal for row

role radiogroup · arguments label

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

Rating

Rating(value: 3.5, max: 5, size: "small")

role rating · arguments value

Source
Rating(60)

Select

Select("Age", options: ["Ten", "Twenty"], value: "Twenty", open: true)

role select · arguments label · defaults variant: "outlined" · variants outlined, filled, standard

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

Skeleton

Skeleton(variant: "circular").frame(width: 40, height: 40)

role shape · defaults shape: "rectangle", variant: "text" · variants text, rectangular, rounded, circular

text
rectangular
rounded
circular
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Skeleton().variant("text").frame(width: 160, height: 96); Text("text").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Skeleton().variant("rectangular").frame(width: 160, height: 96); Text("rectangular").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Skeleton().variant("rounded").frame(width: 160, height: 96); Text("rounded").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Skeleton().variant("circular").frame(width: 160, height: 96); Text("circular").font(.caption).foregroundStyle(.secondary) }
}

Slide

role group

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

Slider

Slider(value: 30, min: 0, max: 100, color:) · value: [20, 37] for a range

role slider

Source
Slider()

Snackbar

Snackbar("Note archived", action: "UNDO", closable: true) · position: .bottomCenter

role toast · arguments message

Message
Source
Snackbar("Message")

SparkLineChart

role chart · defaults kind: "sparkline"

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

SpeedDial

role fab · arguments icon · defaults color: "primary"

Source
SpeedDial("star")

Stack

Stack(spacing: 16) · orientation: .horizontal for direction="row" (spacing in px)

role vstack · defaults alignment: "stretch"

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

StaticDatePicker

role calendar

November 2026
SuMoTuWeThFrSa12345678910111213141516171819202122232425262728293012345
Source
StaticDatePicker()

Step

Stepper { Step("Shipping") … } (or steps: [..])

role text · arguments label

Source
Step("Label")

StepLabel

role text · arguments label

Source
StepLabel("Label")

Stepper

Stepper(["Shipping", "Payment", "Review"], activeStep: 1) · orientation: .vertical

role steps · arguments steps · variants horizontal, vertical

1Cart
2Shipping
3Payment
horizontal
1Cart
2Shipping
3Payment
vertical
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Stepper(["Cart", "Shipping", "Payment"]).variant("horizontal"); Text("horizontal").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Stepper(["Cart", "Shipping", "Payment"]).variant("vertical"); Text("vertical").font(.caption).foregroundStyle(.secondary) }
}

SvgIcon

Material icon by name: SvgIcon("inbox")

role icon · arguments name

Source
SvgIcon("star")

SwipeableDrawer

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

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

Switch

Switch("Wi-Fi", checked: true) · labelPlacement: .start

role toggle · arguments label

Label
Source
Switch("Label")

Tab

Tab("Favorites", icon: "favorite") { panel }

role tab · arguments label

Source
Tab("Label")

TabList

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

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

TabPanel

role vstack · defaults alignment: "stretch"

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

Table

Table(columns: [..], rows: [[..]], size: "small") or TableRow { TableCell … } children

role table

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

TableCell

Cell inside TableRow

role text · arguments content

Content
Source
TableCell("Content")

TableContainer

Paper around a Table

role card · defaults elevation: 1

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

TablePagination

TablePagination("Rows per page: 10 ▾ 1–10 of 100") — the label, then prev/next

role pagination · arguments summary

Source
TablePagination("Summary")

TableRow

role tablerow

Source
TableRow()

Tabs

Tabs(["Account", "Security"], value: 0) or Tabs { Tab("One") { panel } }

role tabs · arguments items · defaults placement: "top" · variants standard, scrollable, fullWidth

OneTwo
First tab
standard
OneTwo
First tab
scrollable
OneTwo
First tab
fullWidth
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("standard"); Text("standard").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("scrollable"); Text("scrollable").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("fullWidth"); Text("fullWidth").font(.caption).foregroundStyle(.secondary) }
}

TextField

TextField("Email", value: "…", helperText:, error: true, prefix: "$", size: "small", multiline via kind: .multiline)

role textfield · arguments label · defaults variant: "outlined" · variants outlined, filled, standard

outlined
filled
standard
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { TextField("Label").variant("outlined"); Text("outlined").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { TextField("Label").variant("filled"); Text("filled").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { TextField("Label").variant("standard"); Text("standard").font(.caption).foregroundStyle(.secondary) }
}

TextareaAutosize

role textfield · arguments placeholder · defaults kind: "multiline", variant: "outlined"

Placeholder
Source
TextareaAutosize("Placeholder")

TimePicker

role datepicker · arguments label · defaults kind: "time", variant: "outlined"

Source
TimePicker("Label")

Timeline

role steps · arguments steps · defaults orientation: "vertical"

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

ToggleButton

ToggleButton(icon: "format_bold").selected()

role button · arguments label

Label
Source
ToggleButton("Label")

ToggleButtonGroup

ToggleButtonGroup(["Web", "Android", "iOS"], value: "Web") — items may be ["icon": …] dicts

role segmented · arguments items

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

Toolbar

Toolbar { IconButton; Typography; Spacer(); Button }

role toolbar · variants regular, dense

regular
dense
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Toolbar() { Button("Save"); Button("Share") }.variant("regular"); Text("regular").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Toolbar() { Button("Save"); Button("Share") }.variant("dense"); Text("dense").font(.caption).foregroundStyle(.secondary) }
}

Tooltip

Tooltip("Delete") { IconButton("delete") } · placement: .bottom

role tooltip · arguments title

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

Typography

Typography("Title", variant: "h5", color: "text.secondary")

role text · arguments content · defaults variant: "body1" · variants h1, h2, h3, h4, h5, h6, subtitle1, subtitle2, body1, body2, button, caption, overline, inherit

Contenth1
Contenth2
Contenth3
Contenth4
Contenth5
Contenth6
Contentsubtitle1
Contentsubtitle2
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Typography("Content").variant("h1"); Text("h1").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Typography("Content").variant("h2"); Text("h2").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Typography("Content").variant("h3"); Text("h3").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Typography("Content").variant("h4"); Text("h4").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Typography("Content").variant("h5"); Text("h5").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Typography("Content").variant("h6"); Text("h6").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Typography("Content").variant("subtitle1"); Text("subtitle1").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Typography("Content").variant("subtitle2"); Text("subtitle2").font(.caption).foregroundStyle(.secondary) }
}

Zoom

role group

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

Core vocabulary in this style

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

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

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

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

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

Form

role form

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

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

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

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

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

RadioButton

role radio · arguments label

Label
Source
RadioButton("Label")

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

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)

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

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

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

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

ToolbarItem

ToolbarItem(placement: .topBarTrailing) { … }

role toolbaritem

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

ToolbarItemGroup

role toolbaritem

ContentAction
Source
ToolbarItemGroup() { 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") }