Skip to content

Tailwind Catalyst

Imitates: Catalyst — the Tailwind Plus application UI kit (Headless UI + Tailwind CSS v4), zinc neutrals, plus Tailwind Plus marketing sections Catalyst 2025 · Tailwind CSS 4.1 · Pack id: tailwind · Selected by: pack="tailwind", import Tailwind, import TailwindPlus, import TailwindCatalyst · Default device: desktop (browser chrome)

107 own elements, plus 115 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

Catalyst Alert: a small centred confirmation modal. Alert("Are you sure?", description: "…") actions: { … }

role dialog · arguments title · defaults size: "md", variant: "alert"

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

AlertActions

Alert actions

role hstack · defaults spacing: 12

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

AlertBody

Alert body

role vstack · defaults alignment: "stretch"

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

AlertDescription

Alert description

role text · arguments content

Content
Source
AlertDescription("Content")

AlertTitle

Alert title

role text · arguments content

Content
Source
AlertTitle("Content")

AuthLayout

Centred sign-in page on an inset panel: AuthLayout { VStack { … } }

role vstack · defaults spacing: 0

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

Avatar

Avatar("Erica Jones", src: "…") · initials: "EJ" · square: true

role avatar · arguments name

AL
Source
Avatar("Ana Lima")

AvatarButton

An Avatar that is a button (e.g. a dropdown trigger)

role avatar · arguments name

AL
Source
AvatarButton("Ana Lima")

Badge

Badge("Paid", color: .lime) — rounded-md tinted pill; any Tailwind colour (zinc default)

role badge · arguments text · defaults color: "zinc"

Text
Source
Badge("Text")

BadgeButton

A Badge that is a link/button

role badge · arguments text · defaults color: "zinc"

Text
Source
BadgeButton("Text")

Button

Button("Save", color: .indigo) · variant: .solid|.outline|.plain (or .outline() / .plain()) · color: dark/zinc (default), light, dark, white, dark/white, zinc, indigo, red, … all Tailwind hues

role button · arguments label · defaults variant: "solid" · variants solid, outline, plain

Labelsolid
Labeloutline
Labelplain
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("solid"); Text("solid").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("outline"); Text("outline").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Button("Label").variant("plain"); Text("plain").font(.caption).foregroundStyle(.secondary) }
}

Checkbox

Checkbox("Allow embedding", checked: true, color: .indigo) · indeterminate via checked: .indeterminate

role checkbox · arguments label

Label
Source
Checkbox("Label")

CheckboxField

CheckboxField("Allow embedding", description: "…", checked: true) — checkbox, label and description

role listitem · arguments title · defaults checked: False

Title
Source
CheckboxField("Title")

CheckboxGroup

Stack of CheckboxFields (space-y-3)

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

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

Code

Code("…") — inline code with a hairline border

role text · arguments content

Content
Source
Code("Content")

Combobox

Combobox("Search…", selection: "Can", open: true) { ComboboxOption(…) } — a text input with a listbox

role select · arguments placeholder · defaults trailingIcon: "chevron.up.down"

Placeholder
Source
Combobox("Placeholder")

ComboboxDescription

Option description

role text · arguments content

Content
Source
ComboboxDescription("Content")

ComboboxLabel

Option label

role text · arguments content

Content
Source
ComboboxLabel("Content")

ComboboxOption

One Combobox option

role menuitem · arguments label

Source
ComboboxOption("Label")

Description

Field description (zinc-500)

role text · arguments content

Content
Source
Description("Content")

DescriptionDetails

Details (zinc-950)

role text · arguments content

Content
Source
DescriptionDetails("Content")

DescriptionList

DescriptionList { DescriptionTerm("Customer"); DescriptionDetails("Leslie Alexander") … } — two columns on desktop

role grid

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

DescriptionTerm

Term (zinc-500)

role text · arguments content

Content
Source
DescriptionTerm("Content")

Dialog

Dialog("Refund payment", description: "…") { DialogBody … } actions: { Button("Cancel", variant: .plain); Button("Refund") } · size: .sm…5xl

role dialog · arguments title · defaults size: "lg"

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

DialogActions

Right-aligned actions (gap-3)

role hstack · defaults spacing: 12

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

DialogBody

Dialog body (mt-6)

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

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

DialogDescription

Dialog description

role text · arguments content

Content
Source
DialogDescription("Content")

DialogTitle

Dialog title

role text · arguments content

Content
Source
DialogTitle("Content")

Divider

Divider() · Divider(soft: true) for the lighter zinc-950/5 rule

role divider

Source
Divider()

Dropdown("Options", open: true) { DropdownItem("Edit", shortcut: "⌘E") … } · trigger variant: .outline (default)|.plain|.solid

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

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

Same as Dropdown (Catalyst names the trigger DropdownButton)

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

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

Item description

role text · arguments content

Content
Source
DropdownDescription("Content")

Rule between sections

role divider

Source
DropdownDivider()

Non-interactive header block (px-3.5 pt-2.5 pb-1)

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

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

Section heading (xs/5 medium zinc-500)

role text · arguments content

Content
Source
DropdownHeading("Content")

DropdownItem("Settings", systemImage: "cog-6-tooth", shortcut: "⌘S") · .state(.focused) for the blue highlight

role menuitem · arguments label

Source
DropdownItem("Label")

Item label

role text · arguments content

Content
Source
DropdownLabel("Content")

An open dropdown panel on its own (place it with .offset)

role menu

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

A group of items

role group

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

DropdownShortcut(keys: ["⌘", "K"])

role kbd · arguments keys

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

EmptyState

Tailwind Plus empty state: dashed box, icon, title, description and a button

role emptystate · arguments title

Title
Source
EmptyState("Title")

ErrorMessage

Field error (red-600)

role text · arguments content

Content
Source
ErrorMessage("Content")

Eyebrow

Small indigo kicker above a section title (or a pill announcement with variant: .pill)

role text · arguments content · variants pill

Contentpill
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Eyebrow("Content").variant("pill"); Text("pill").font(.caption).foregroundStyle(.secondary) }
}

Feature

Feature("Push to deploy", description: "…", systemImage: "cloud-arrow-up") — indigo icon tile + title + text

role listitem · arguments title

Title
Source
Feature("Title")

FeatureGrid

Feature section grid: FeatureGrid(columns: 3) { Feature(…) … }

role grid · defaults columns: 3, spacing: 40

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

Field

Field { Label("Email"); Input(…); Description(…) }

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

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

FieldGroup

Stack of fields (space-y-8)

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

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

Fieldset

Fieldset { Legend(…); Text(…); FieldGroup { Field { … } } }

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

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

Heading

Heading("Orders") — text-2xl/8 sm:text-xl/8 semibold · level: 1…6

role text · arguments content · defaults style: "title2"

Content
Source
Heading("Content")

Hero

Marketing hero (simple centred): Hero { Eyebrow(…); Text(…).font(.display); Lead(…); HStack { Button… } }

role vstack · defaults spacing: 24

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

HeroHeading

Hero title (text-6xl semibold tracking-tight, balanced)

role text · arguments content

Content
Source
HeroHeading("Content")

InlineAlert

Tailwind Plus “Alerts” banner: InlineAlert("Attention needed", message: "…", severity: .warning) · variant: .accent for a left border

role alert · arguments title · variants accent

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

Input

Input("you@example.com", label:, description:, text:, type: .email|.password|.search) · invalid: true

role textfield · arguments placeholder

Placeholder
Source
Input("Placeholder")

InputGroup

Input with a leading icon: InputGroup("Search…", systemImage: "magnifying-glass")

role textfield · arguments placeholder

Placeholder
Source
InputGroup("Placeholder")

Kbd

Keyboard keys

role kbd · arguments keys

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

Label

Label("Full name") — form label (sm/6 medium)

role label · arguments title

Title
Source
Label("Title")

Lead

Large muted intro paragraph (text-lg/8)

role text · arguments content

Content
Source
Lead("Content")

Legend

Fieldset legend (base/6 semibold)

role text · arguments content

Content
Source
Legend("Content")

Link("View") — unstyled link (inherits colour)

role link · arguments label

Label
Source
Link("Label")

Listbox

Listbox("Select a status", selection: "Active", open: true) { ListboxOption("Active") … }

role select · arguments placeholder · defaults trailingIcon: "chevron.up.down"

Placeholder
Source
Listbox("Placeholder")

ListboxDescription

Option description

role text · arguments content

Content
Source
ListboxDescription("Content")

ListboxLabel

Option label

role text · arguments content

Content
Source
ListboxLabel("Content")

ListboxOption

One Listbox option

role menuitem · arguments label

Source
ListboxOption("Label")

Navbar { NavbarSection { NavbarItem("Home", current: true) }; NavbarSpacer(); NavbarItem(systemImage:) }

role toolbar

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

Vertical rule between navbar groups

role divider

Source
NavbarDivider()

NavbarItem("Orders", systemImage:, current: true) — the current item gets an underline bar

role navitem · arguments label

Label
Source
NavbarItem("Label")

Text inside a navbar item

role text · arguments content

Content
Source
NavbarLabel("Content")

Group of navbar items

role hstack · defaults spacing: 12

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

Flexible gap

role spacer

Source
NavbarSpacer()

Notification

Tailwind Plus notification panel (top right): Notification("Successfully saved!", description: "…", systemImage: "check-circle")

role toast · arguments message · defaults closable: True, position: "top-right"

Message
Source
Notification("Message")

Pagination

Pagination(count: 10, page: 2) — Previous · pages · Next, spread over the width

role pagination

Source
Pagination()

PricingGrid

Row of PricingTier cards

role grid · defaults columns: 3, spacing: 32

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

PricingTier

PricingTier("Startup", description: "…", featured: true) { price, features } actions: { Button }

role card · arguments title

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

Radio

Radio("Monthly", checked: true)

role radio · arguments label

Label
Source
Radio("Label")

RadioField

Radio with its label

role radio · arguments label

Label
Source
RadioField("Label")

RadioGroup

RadioGroup(selection: "Monthly") { Radio("Monthly"); Radio("Yearly") }

role radiogroup · arguments label

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

SectionHeading

Marketing section title (text-4xl semibold tracking-tight)

role text · arguments content

Content
Source
SectionHeading("Content")

Select

Native select: Select("Country", selection: "Canada") { … }

role select · arguments placeholder · defaults trailingIcon: "chevron.up.down"

Placeholder
Source
Select("Placeholder")

Sidebar { SidebarHeader { … }; SidebarBody { SidebarSection { SidebarItem(…) } }; SidebarFooter { … } }

role sidebar

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

SidebarBody

Scrolling middle block

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

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

SidebarDivider

Rule between sidebar sections

role divider

Source
SidebarDivider()

SidebarFooter

Bottom block with a top border

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

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

SidebarHeader

Top block with a bottom border

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

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

SidebarHeading

SidebarHeading("Upcoming events") — xs zinc-500 section title

role text · arguments content

Content
Source
SidebarHeading("Content")

SidebarItem

SidebarItem("Home", systemImage: "home", current: true) — current: indicator bar on the left

role navitem · arguments label

Label
Source
SidebarItem("Label")

SidebarLabel

Label inside a sidebar item

role text · arguments content

Content
Source
SidebarLabel("Content")

SidebarLayout

App shell: SidebarLayout { Sidebar { … }; VStack { page } } — the page sits on a white panel with a ring, inset on zinc-100

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

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

SidebarSection

A group of items (gap-0.5)

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

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

SidebarSpacer

Pushes the following sections down

role spacer

Source
SidebarSpacer()

StackedLayout

App shell: StackedLayout { Navbar { … }; VStack { page } } — navbar on top, page on an inset panel

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

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

Stat

Stat(label:, value:, change:) — dashboard stat with a top rule (Catalyst demo)

role stat · arguments label, value

Label
60
Source
Stat("Label", 60)

Strong

Strong("…") — zinc-950 medium

role text · arguments content

Content
Source
Strong("Content")

Subheading

Subheading("Recent orders") — text-base/7 sm:text-sm/6 semibold

role text · arguments content · defaults style: "subheadline"

Content
Source
Subheading("Content")

Switch

Switch(isOn: true, color: .emerald) — h-5 w-8 track, any Tailwind colour

role toggle · arguments label

Label
Source
Switch("Label")

SwitchField

SwitchField("Allow embedding", isOn: true, description: "…") — label + description left, switch right

role toggle · arguments label

Label
Source
SwitchField("Label")

SwitchGroup

Stack of SwitchFields (space-y-3)

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

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

Table

Table(columns: […], rows: […]) or TableHeader/TableRow children · variant: .striped|.grid · dense: true · bleed: true

role table · variants striped, grid, bleed

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

TableBody

Kept for source compatibility; put TableRow children directly in the Table

role group

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

TableCell

TableCell("…") — a cell (or any view)

role text · arguments content

Content
Source
TableCell("Content")

TableHead

Kept for source compatibility; put TableHeader children directly in the Table

role group

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

TableHeader

TableHeader("Amount", alignment: .trailing)

role tablecolumn · arguments title

Source
TableHeader("Title")

TableRow

TableRow { TableCell(…) … } · selected:

role tablerow

Source
TableRow()

Tabs

Tailwind Plus underline tabs: Tabs(selection: "Billing") { Tab("Account") { … } … } · variant: .pills

role tabs · defaults placement: "top" · variants underline, pills

OneTwo
First tab
underline
OneTwo
First tab
pills
Source
HStack(alignment: .top, spacing: 16) {
  VStack(alignment: .leading, spacing: 4) { Tabs() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }.variant("underline"); Text("underline").font(.caption).foregroundStyle(.secondary) }
  VStack(alignment: .leading, spacing: 4) { Tabs() { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }.variant("pills"); Text("pills").font(.caption).foregroundStyle(.secondary) }
}

Text

Text("…") — body copy in zinc-500 (Catalyst Text); Markdown inline bold code

role text · arguments content

Content
Source
Text("Content")

TextLink("docs") — underlined link

role link · arguments label

Label
Source
TextLink("Label")

Textarea

Textarea("…", rows: 4)

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

Placeholder
Source
Textarea("Placeholder")

TouchTarget

No-op wrapper kept for source compatibility

role group

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

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)

Card

role card · arguments title

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

Chart

kind: .bar|.line|.area|.pie|.donut|.scatter|.bubble|.radar|.heatmap|.funnel|.treemap|.gauge|.candlestick|.combo|.sparkline; values:/series:/labels:/points:/matrix:

role chart

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

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

DatePicker

selection: "2026-11-23"; .datePickerStyle(.graphical)

role datepicker · arguments label

Source
DatePicker("Label")

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)

FloatingActionButton

role fab · arguments icon

Source
FloatingActionButton("star")

Form

role form

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

FunnelChart

role chart · defaults kind: "funnel"

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

Gantt

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

role gantt

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

Gauge

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

Source
Gauge(60)

GaugeChart

role chart · defaults kind: "gauge"

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

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

Icon

role icon · arguments name

Source
Icon("star")

IconButton

role button · arguments icon · defaults iconOnly: True

Source
IconButton("star")

Image

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

role image · arguments name

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

KanbanCard

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

role kanbancard · arguments title

Title
Source
KanbanCard("Title")

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

List

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

role list

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

ListItem

role listitem · arguments title

Title
Source
ListItem("Title")

Map

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

role map

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

role menu · arguments label

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

role menuitem · arguments label

Source
MenuItem("Label")

MessageBubble

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

role message · arguments text

Text
Source
MessageBubble("Text")

role navitem · arguments label

Label
Source
NavItem("Label")

role listitem · arguments title · defaults chevron: True

Title
Source
NavigationLink("Title")

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

role split

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

Content's .navigationTitle / .toolbar form the bar

role navstack

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

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

RadioButton

role radio · arguments label

Label
Source
RadioButton("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") }

Skeleton

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

role skeleton

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

Slider

Slider(value: 0.4) or Slider(value: 30, in: 0...100)

role slider

Source
Slider()

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

Stepper

role stepper · arguments label

Label
Source
Stepper("Label")

Steps

role steps · arguments steps

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

StickyNote

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

role stickynote · arguments text

Text
Source
StickyNote("Text")

Tab

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

role tab · arguments label

Source
Tab("Label")

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

TextEditor

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

Text
Source
TextEditor("Text")

TextField

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

role textfield · arguments placeholder

Placeholder
Source
TextField("Placeholder")

Timeline

role timeline

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

TimelineItem

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

role timelineitem · arguments title

Title
Source
TimelineItem("Title")

Toast

role toast · arguments message

Message
Source
Toast("Message")

Toggle

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

role toggle · arguments label

Label
Source
Toggle("Label")

Toolbar

role toolbar

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

ToolbarItem

ToolbarItem(placement: .topBarTrailing) { … }

role toolbaritem

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

ToolbarItemGroup

role toolbaritem

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

Tooltip

role tooltip · arguments text

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

Tree

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

role tree

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

TreeItem

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

role treeitem · arguments label

Label
Source
TreeItem("Label")

Treemap

role chart · defaults kind: "treemap"

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

VStack

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

role vstack

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

VideoPlayer

poster image, progress: 0…1, time:, duration:, playing:

role media · arguments image

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

Whiteboard

role canvas · defaults grid: "dots"

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

ZStack

Overlapping layers. alignment:

role zstack

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