Skip to content

Android · Jetpack Compose

Imitates: Jetpack Compose · Material 3 Expressive (baseline scheme) Compose Material 3 1.4 · Android 16 · Pack id: android · Selected by: pack="android", import Android, import JetpackCompose, import Compose, import Material3 · Default device: phone (android chrome)

118 own elements, plus 119 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

AlertDialog

AlertDialog(title: "Discard draft?", text: "…", icon: "delete", buttons: ["Cancel", "Discard"]) or confirmButton: { TextButton… }

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

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

AssistChip

AssistChip("Add to calendar", leadingIcon: "event") — 32dp, 8dp corners

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

Label
Source
AssistChip("Label")

Badge

Badge() — 6dp dot; Badge("12") — 16dp large badge (error colours)

role badge · arguments text

Text
Source
Badge("Text")

BadgedBox

BadgedBox(badge: 3) { Icon("mail") } — badge: true for a dot

role label

Source
BadgedBox()

BasicAlertDialog

BasicAlertDialog { custom content }

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

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

BottomAppBar

BottomAppBar { IconButton(…) …; Spacer(); FloatingActionButton("add", inline: true) }

role toolbar

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

Box

Compose Box: overlapping children; alignment:

role zstack

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

Button

Button(onClick: {}) { Text("Save") } or Button("Save", icon:) — filled, 40dp pill

role button · arguments label · defaults variant: "filled" · variants filled, tonal, outlined, text, elevated

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

ButtonGroup

M3 Expressive ButtonGroup { ToggleButton … } (standard)

role hstack · defaults spacing: 8

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

Card

Card { … } — filled (surfaceContainerHighest), 12dp corners; title:, subtitle:, image:, actions:

role card · arguments title · defaults variant: "filled" · variants filled, elevated, outlined

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

CarouselItem

CarouselItem { Image(…); Text("caption") } — a masked carousel item with an overlay label

role zstack · defaults alignment: "bottomLeading"

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

CenterAlignedTopAppBar

CenterAlignedTopAppBar(title:, navigationIcon:, actions:)

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

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

Checkbox

Checkbox(checked: true) (label optional, Compose puts it in a Row)

role checkbox · arguments label

Label
Source
Checkbox("Label")

CircularProgressIndicator

CircularProgressIndicator(progress: 0.7)

role progress · defaults variant: "circular"

Source
CircularProgressIndicator()

CircularWavyProgressIndicator

M3 Expressive wavy circular indicator

role progress · defaults variant: "circular"

Source
CircularWavyProgressIndicator()

Column

Compose Column (vertical layout); spacing:, alignment:

role vstack · defaults alignment: "leading"

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

ConnectedButtonGroup

M3 Expressive connected button group: ToggleButtons with shared inner corners

role hstack · defaults spacing: 2

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

DatePicker

DatePicker(selection: "2026-11-27") — month grid, selected day in a primary circle, today outlined

role calendar · defaults showToday: True

November 2026
SuMoTuWeThFrSa12345678910111213141516171819202122232425262728293012345
Source
DatePicker()

DatePickerDialog

DatePickerDialog(actions: { TextButton("Cancel"); TextButton("OK") }) { DatePicker(…) }

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

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

DatePickerField

a date text field with a calendar icon: DatePickerField("Date", selection:)

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

Source
DatePickerField("Label")

DateRangePicker

DateRangePicker(range: ["2026-11-23", "2026-11-27"])

role calendar · defaults showToday: True

November 2026
SuMoTuWeThFrSa12345678910111213141516171819202122232425262728293012345
Source
DateRangePicker()

Dialog

Dialog { Card { … } } — a custom dialog window

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

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

DismissibleNavigationDrawer

an open dismissible drawer beside the content

role sidebar · defaults variant: "drawer"

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

DockedSearchBar

DockedSearchBar("Search", query:)

role textfield · arguments placeholder · defaults kind: "search", variant: "docked"

Placeholder
Source
DockedSearchBar("Placeholder")

DropdownMenu(expanded: true) { DropdownMenuItem("Edit", leadingIcon: "edit") } — label:/icon: give it an anchor

role menu · arguments label

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

DropdownMenuItem("Share", leadingIcon: "share", trailingText: "⌘S")

role menuitem · arguments label

Source
DropdownMenuItem("Label")

ElevatedAssistChip

elevated assist chip

role chip · arguments label · defaults elevation: "1", variant: "assist"

Label
Source
ElevatedAssistChip("Label")

ElevatedButton

surfaceContainerLow pill button with level-1 shadow

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

Label
Source
ElevatedButton("Label")

ElevatedCard

ElevatedCard: surfaceContainerLow + level-1 shadow

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

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

ElevatedFilterChip

elevated filter chip

role chip · arguments label · defaults elevation: "1", variant: "filter"

Label
Source
ElevatedFilterChip("Label")

ElevatedSuggestionChip

elevated suggestion chip

role chip · arguments label · defaults elevation: "1", variant: "suggestion"

Label
Source
ElevatedSuggestionChip("Label")

ExposedDropdownMenuBox

ExposedDropdownMenuBox("Country", value: "Portugal", options: [..], expanded: true)

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

Source
ExposedDropdownMenuBox("Label")

ExtendedFloatingActionButton

ExtendedFloatingActionButton("Compose", icon: "edit") — 56dp, label + icon

role fab · arguments label

Label
Source
ExtendedFloatingActionButton("Label")

FilledIconButton

FilledIconButton("add")

role button · arguments icon · defaults iconOnly: True, variant: "filled"

Source
FilledIconButton("star")

FilledTonalButton

secondaryContainer pill button

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

Label
Source
FilledTonalButton("Label")

FilledTonalIconButton

FilledTonalIconButton("edit")

role button · arguments icon · defaults iconOnly: True, variant: "tonal"

Source
FilledTonalIconButton("star")

FilterChip

FilterChip("Nature", selected: true) — check icon when selected

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

Label
Source
FilterChip("Label")

FloatingActionButton

FloatingActionButton("add") — 56dp, 16dp corners, primaryContainer; floats bottom-end (inline: true to place in flow)

role fab · arguments icon

Source
FloatingActionButton("star")

FlowRow

FlowRow { … } — wraps its children (chips)

role hstack · defaults spacing: 8, wrap: True

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

HorizontalCenteredHeroCarousel

M3 Expressive hero carousel: one large centred item between two small ones

role hstack · defaults spacing: 8, variant: "hero"

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

HorizontalDivider

HorizontalDivider() — 1dp outlineVariant; .variant(.inset) for a 16dp inset

role divider

Source
HorizontalDivider()

HorizontalFloatingToolbar

M3 Expressive floating toolbar: a pill of IconButtons

role toolbar · defaults variant: "floating"

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

HorizontalMultiBrowseCarousel

HorizontalMultiBrowseCarousel { Image(…) … } — large, medium and small items with 28dp corners

role hstack · defaults spacing: 8, variant: "multiBrowse"

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

HorizontalUncontainedCarousel

HorizontalUncontainedCarousel { Image(…) … } — equal-width items

role hstack · defaults spacing: 8, variant: "uncontained"

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

Icon

Icon("favorite") — Material Symbols names (snake_case) map onto built-in glyphs

role icon · arguments name

Source
Icon("star")

IconButton

IconButton("more_vert") — 40dp touch target, on-surface-variant icon; selected: for toggles

role button · arguments icon · defaults iconOnly: True, variant: "standard"

Source
IconButton("star")

IconToggleButton

IconToggleButton("star", selected: true)

role button · arguments icon · defaults iconOnly: True, variant: "standard"

Source
IconToggleButton("star")

InputChip

InputChip("Ana Lima", avatar: "Ana Lima") — trailing close icon

role chip · arguments label · defaults removable: True, variant: "input"

Label
Source
InputChip("Label")

LargeFlexibleTopAppBar

M3 Expressive LargeFlexibleTopAppBar(title:, subtitle:)

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

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

LargeFloatingActionButton

96dp, 28dp corners

role fab · arguments icon · defaults size: "large"

Source
LargeFloatingActionButton("star")

LargeTopAppBar

LargeTopAppBar: 152dp, headlineMedium title below the icons

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

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

LazyColumn

LazyColumn { … } — a vertically scrolling column

role scroll

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

LazyRow

LazyRow { … } — a horizontally scrolling row

role scroll · defaults axes: "horizontal"

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

LazyVerticalGrid

LazyVerticalGrid(columns: 3, spacing:) { … }

role grid · arguments columns

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

LeadingIconTab

LeadingIconTab("Mail", icon:) (rendered like Tab)

role tab · arguments label

Source
LeadingIconTab("Label")

LinearProgressIndicator

LinearProgressIndicator(progress: 0.6) — no progress: indeterminate

role progress

Source
LinearProgressIndicator()

LinearWavyProgressIndicator

M3 Expressive wavy linear indicator (progress:)

role progress · defaults variant: "wavy"

Source
LinearWavyProgressIndicator()

ListDetailPaneScaffold

adaptive list–detail: ListDetailPaneScaffold { listPane; detailPane } (two children)

role split

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

ListItem

ListItem(headlineContent: "Ana", supportingContent:, overlineContent:, leadingContent: { Avatar(…) }, trailingContent: { Text("9:41") }) — or title/subtitle/avatar:/icon:

role listitem · arguments title

Title
Source
ListItem("Title")

LoadingIndicator

M3 Expressive LoadingIndicator (shown as a spinner)

role progress · defaults variant: "circular"

Source
LoadingIndicator()

MediumFlexibleTopAppBar

M3 Expressive MediumFlexibleTopAppBar(title:, subtitle:)

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

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

MediumFloatingActionButton

M3 Expressive 80dp FAB, 20dp corners

role fab · arguments icon · defaults size: "medium"

Source
MediumFloatingActionButton("star")

MediumTopAppBar

MediumTopAppBar: 112dp, headlineSmall title below the icons

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

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

ModalBottomSheet

ModalBottomSheet { … } — 28dp top corners, drag handle, over a scrim

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

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

ModalDrawerSheet

the sheet of an open ModalNavigationDrawer (same rendering)

role dialog · defaults variant: "drawer"

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

ModalNavigationDrawer

an open modal drawer over the screen: ModalNavigationDrawer { Text("Mail"); NavigationDrawerItem(…) }

role dialog · defaults variant: "drawer"

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

MultiChoiceSegmentedButtonRow

MultiChoiceSegmentedButtonRow (renders one selection: selection:)

role segmented · arguments items

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

NavigationBar { NavigationBarItem("Mail", icon: "mail", selected: true, badge: 3) … }

role tabs · defaults placement: "bottom"

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

label, icon:, selected:, badge: (number, or true for a dot)

role tab · arguments label

Source
NavigationBarItem("Label")

label, icon:, selected:, badge: (shown as trailing text)

role navitem · arguments label

Label
Source
NavigationDrawerItem("Label")

NavigationRail(header: { FloatingActionButton("edit", inline: true) }) { NavigationRailItem(…) }

role sidebar · defaults variant: "rail"

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

label, icon:, selected:, badge:

role navitem · arguments label

Label
Source
NavigationRailItem("Label")

adaptive navigation: NavigationSuiteScaffold { NavigationRail { … }; content }

role split

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

OutlinedButton

outline-bordered pill button

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

Label
Source
OutlinedButton("Label")

OutlinedCard

OutlinedCard: surface with an outlineVariant border

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

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

OutlinedExposedDropdownMenuBox

an ExposedDropdownMenuBox holding an OutlinedTextField

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

Source
OutlinedExposedDropdownMenuBox("Label")

OutlinedIconButton

OutlinedIconButton("share")

role button · arguments icon · defaults iconOnly: True, variant: "outlined"

Source
OutlinedIconButton("star")

OutlinedSecureTextField

OutlinedSecureTextField("Password", value:, reveal:)

role textfield · arguments label · defaults kind: "password", variant: "outlined"

Source
OutlinedSecureTextField("Label")

OutlinedTextField

OutlinedTextField("Email", value:, supportingText:, isError:, leadingIcon:, trailingIcon:)

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

Source
OutlinedTextField("Label")

PermanentDrawerSheet

a permanent drawer sheet

role sidebar · defaults variant: "drawer"

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

PermanentNavigationDrawer

PermanentDrawerSheet beside the content (tablets)

role sidebar · defaults variant: "drawer"

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

PlainTooltip

PlainTooltip("Delete") { IconButton("delete") }

role tooltip · arguments text

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

PrimaryScrollableTabRow

PrimaryScrollableTabRow(selectedTabIndex:)

role tabs · arguments items · defaults placement: "top", variant: "scrollable"

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

PrimaryTabRow

PrimaryTabRow(selectedTabIndex:) { Tab(…) } — content-width indicator, primary colour

role tabs · arguments items · defaults placement: "top", variant: "primary"

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

RadioButton

RadioButton(selected: true) (label optional)

role radio · arguments label

Label
Source
RadioButton("Label")

RangeSlider

RangeSlider(value: [20, 80], in: 0...100)

role slider

Source
RangeSlider()

RichTooltip

RichTooltip("Title", message: "…", actions: { TextButton("Learn more") }) { anchor }

role tooltip · arguments text · defaults variant: "rich"

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

Scaffold

Scaffold { TopAppBar(…); content; NavigationBar { … } } — fills the screen; FABs float over it

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

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

ScrollableTabRow

ScrollableTabRow / PrimaryScrollableTabRow

role tabs · arguments items · defaults placement: "top", variant: "scrollable"

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

SearchBar("Search in mail", leadingIcon: "menu", trailingIcon: "account_circle", query:) — 56dp pill

role textfield · arguments placeholder · defaults kind: "search", variant: "searchbar"

Placeholder
Source
SearchBar("Placeholder")

SecondaryTabRow

SecondaryTabRow(selectedTabIndex:) — full-width 2dp indicator, on-surface text

role tabs · arguments items · defaults placement: "top", variant: "secondary"

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

SecureTextField

SecureTextField("Password", value:) — masked

role textfield · arguments label · defaults kind: "password", variant: "filled"

Source
SecureTextField("Label")

SegmentedButton

SegmentedButton("Week") inside a SegmentedButtonRow; the row's selection: picks it

role button · arguments label

Label
Source
SegmentedButton("Label")

ShortNavigationBar

M3 Expressive ShortNavigationBar (64dp); same items as NavigationBar

role tabs · defaults placement: "bottom", variant: "short"

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

ShortNavigationBarItem

label, icon:, selected:, badge:

role tab · arguments label

Source
ShortNavigationBarItem("Label")

SingleChoiceSegmentedButtonRow

SingleChoiceSegmentedButtonRow(selection: "Week") { SegmentedButton("Day") … } or (["Day", "Week"], selection: 1)

role segmented · arguments items

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

Slider

Slider(value: 0.4) or (value: 30, in: 0...100, steps: 4, ticks: true) — M3 Expressive bar handle

role slider

Source
Slider()

SmallFloatingActionButton

40dp, 12dp corners

role fab · arguments icon · defaults size: "small"

Source
SmallFloatingActionButton("star")

Snackbar

Snackbar("Message archived", action: "Undo") — inverseSurface; inline: true to place in flow

role toast · arguments message

Message
Source
Snackbar("Message")

SuggestionChip

SuggestionChip("Sounds good!")

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

Label
Source
SuggestionChip("Label")

Surface

Surface(color:, tonalElevation:) { … } — a plain M3 surface; .elevation(1…5) adds tonal elevation

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

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

Switch

Switch(checked: true) — 52×32 track, check icon in the thumb when on (thumbContent)

role toggle · arguments label

Label
Source
Switch("Label")

Tab

Tab("Photos", icon: "photo", selected:) { panel content }

role tab · arguments label

Source
Tab("Label")

TabRow

TabRow(selectedTabIndex: 0) { Tab("Photos", icon:) … } or TabRow(["A", "B"])

role tabs · arguments items · defaults placement: "top", variant: "primary"

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

TextButton

text-only button (dialog actions, card actions)

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

Label
Source
TextButton("Label")

TextField

TextField("Label", value:, placeholder:, supportingText:, isError:, leadingIcon: "search", trailingIcon:) — filled

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

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

TimeInput

TimeInput("Time", selection: "10:30 AM")

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

Source
TimeInput("Label")

TimePicker

TimePicker(hour: "10") — the 256dp clock dial with the selected hour

role radiogroup · defaults options: ["12", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"], variant: "dial"

121234567891011
Source
TimePicker()

TimePickerDialog

TimePickerDialog(title: "Select time", actions:) { TimePicker(hour: "10") }

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

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

ToggleButton

M3 Expressive ToggleButton("Bold", checked: true)

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

Label
Source
ToggleButton("Label")

Tooltip

plain tooltip: Tooltip("Add to favorites") { IconButton("star") }

role tooltip · arguments text

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

TooltipBox

TooltipBox("Label") { anchor }

role tooltip · arguments text

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

TopAppBar

TopAppBar(title: "Inbox", navigationIcon: { IconButton("menu") }, actions: { IconButton("search") }) — 64dp small bar

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

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

TopSearchBar

M3 Expressive TopSearchBar (app bar with search)

role textfield · arguments placeholder · defaults kind: "search", variant: "searchbar"

Placeholder
Source
TopSearchBar("Placeholder")

TriStateCheckbox

TriStateCheckbox(state: .indeterminate | .on | .off)

role checkbox · arguments label

Label
Source
TriStateCheckbox("Label")

VerticalDivider

VerticalDivider() inside a Row

role divider

Source
VerticalDivider()

VerticalSlider

M3 Expressive VerticalSlider (rendered horizontally)

role slider

Source
VerticalSlider()

WideNavigationRail

M3 Expressive WideNavigationRail (collapsed)

role sidebar · defaults variant: "rail"

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

Core vocabulary in this style

Accordion

role accordion · arguments title

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

Alert

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

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

AppBar

role appbar · arguments title

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

AreaChart

role chart · defaults kind: "area"

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

AsyncImage

role image · arguments url

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

Avatar

role avatar · arguments name

AL
Source
Avatar("Ana Lima")

role alert · arguments title

Source
Banner("Title")

BarChart

role chart · defaults kind: "bar"

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

Board

Kanban board of BoardColumn children

role board

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

BoardColumn

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

role boardcolumn · arguments title

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

role breadcrumb · arguments items

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

BubbleChart

role chart · defaults kind: "bubble"

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

Calendar

role calendar

November 2026
SuMoTuWeThFrSa12345678910111213141516171819202122232425262728293012345
Source
Calendar()

Callout

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

role callout · arguments number, text

1Text
Source
Callout(1, "Text")

CandlestickChart

role chart · defaults kind: "candlestick"

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

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

DisclosureGroup

role accordion · arguments title

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

Divider

role divider

Source
Divider()

DonutChart

role chart · defaults kind: "donut"

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

Dropzone

role dropzone · arguments label

Label
Source
Dropzone("Label")

Ellipse

role shape · defaults shape: "ellipse"

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

EmptyState

title, systemImage:, description: { actions }

role emptystate · arguments title

Title
Source
EmptyState("Title")

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

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

Image

Image("path.png") or Image(systemName: "star")

role image · arguments name

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

KanbanCard

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

role kanbancard · arguments title

Title
Source
KanbanCard("Title")

Kbd

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

role kbd · arguments keys

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

Label

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

role label · arguments title

Title
Source
Label("Title")

LabeledContent

role labeled · arguments label, value

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

LazyHGrid

role grid

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

LazyHStack

role hstack

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

LazyVGrid

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

role grid

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

LazyVStack

role vstack

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

LineChart

role chart · defaults kind: "line"

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

role link · arguments label, destination

Label
Source
Link("Label")

List

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

role list

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

Map

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

role map

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

role menu · arguments label

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

role menuitem · arguments label

Source
MenuItem("Label")

MessageBubble

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

role message · arguments text

Text
Source
MessageBubble("Text")

role navitem · arguments label

Label
Source
NavItem("Label")

role listitem · arguments title · defaults chevron: True

Title
Source
NavigationLink("Title")

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

role split

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

Content's .navigationTitle / .toolbar form the bar

role navstack

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

role navstack

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

Pagination

role pagination

Source
Pagination()

Picker

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

role select · arguments label

Source
Picker("Label")

PieChart

role chart · defaults kind: "pie"

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

Placeholder

A labelled box for maps, charts, media

role placeholder · arguments label

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

Pointer

Pointer(.arrow|.hand|.ibeam|.grab|.crosshair|.touch); place with .position

role pointer · arguments kind

Source
Pointer(.arrow)

ProgressView

value: 0…1 (or total:); none = indeterminate

role progress · arguments label

Label
Source
ProgressView("Label")

RadarChart

role chart · defaults kind: "radar"

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

RadioGroup

role radiogroup · arguments label

Label
Source
RadioGroup("Label")

Rating

role rating · arguments value

Source
Rating(60)

Rectangle

role shape · defaults shape: "rectangle"

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

RoundedRectangle

role shape · defaults shape: "rounded"

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

Row

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

role listitem · arguments title

Title
Source
Row("Title")

ScatterChart

role chart · defaults kind: "scatter"

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

Schedule

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

role schedule

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

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

Skeleton

lines:, avatar:, image:, shape: .circle|.rectangle|.text

role skeleton

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

Spacer

role spacer

Source
Spacer()

Sparkline

role chart · arguments values · defaults kind: "sparkline"

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

Spreadsheet

rows: [[…]], selection: "B2:C4", active:, formula:, sheets: [..], highlight: ["B3": .yellow]

role spreadsheet

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

Stat

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

role stat · arguments label, value

Label
60
Source
Stat("Label", 60)

Stepper

role stepper · arguments label

Label
Source
Stepper("Label")

Steps

role steps · arguments steps

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

StickyNote

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

role stickynote · arguments text

Text
Source
StickyNote("Text")

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

Table

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

role table

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

TableColumn

role tablecolumn · arguments title

Source
TableColumn("Title")

TableRow

role tablerow

Source
TableRow()

Tabs

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

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

Tag

role chip · arguments label

Label
Source
Tag("Label")

Terminal

lines starting with "$ " are commands

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

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

Text

Text with bold, italic, code Markdown

role text · arguments content

Content
Source
Text("Content")

TextEditor

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

Text
Source
TextEditor("Text")

Timeline

role timeline

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

TimelineItem

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

role timelineitem · arguments title

Title
Source
TimelineItem("Title")

Toast

role toast · arguments message

Message
Source
Toast("Message")

Toggle

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

role toggle · arguments label

Label
Source
Toggle("Label")

Toolbar

role toolbar

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

ToolbarItem

ToolbarItem(placement: .topBarTrailing) { … }

role toolbaritem

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

ToolbarItemGroup

role toolbaritem

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

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