PrimeVue · Aura¶
Imitates: PrimeVue 4 / PrimeNG 18+ / PrimeReact (styled mode) · Aura theme preset PrimeVue 4 · @primeuix/themes Aura · Pack id: prime · Selected by: pack="prime", import PrimeVue, import PrimeNG, import PrimeReact, import Prime · Default device: desktop (browser chrome)
123 own elements, plus 98 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 { AccordionPanel("Header I", expanded: true) { … } … }
role vstack · defaults alignment: "stretch", spacing: 0
Source
Accordion() { Text("Content"); Button("Action") }AccordionContent¶
Transparent wrapper
role group
Source
AccordionContent() { Text("Content"); Button("Action") }AccordionPanel¶
AccordionPanel("Header I", expanded: true) { AccordionContent }
role accordion · arguments header
Source
AccordionPanel("Header") { Text("Content"); Button("Action") }AccordionTab¶
Pre-v4 name of AccordionPanel
role accordion · arguments header
Source
AccordionTab("Header") { Text("Content"); Button("Action") }AutoComplete¶
AutoComplete("Search", selection:, options:, open: true, dropdown: true)
role select · arguments placeholder
Source
AutoComplete("Placeholder")Avatar¶
Avatar(label: "P", image: "…", icon: "pi pi-user", shape: "circle", size: "large"|"xlarge")
role avatar · arguments label · variants circle, square
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Avatar("Label").variant("circle"); Text("circle").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Avatar("Label").variant("square"); Text("square").font(.caption).foregroundStyle(.secondary) }
}AvatarGroup¶
AvatarGroup { Avatar(shape: "circle") … } — overlapped
role hstack · defaults spacing: 0
Source
AvatarGroup() { Text("Content"); Button("Action") }Badge¶
Badge(value: 4, severity: "danger", size: "large") · Badge() is a dot
role badge · arguments value
Source
Badge("Value")BlockUI¶
BlockUI(blocked: true) { content } — masks its content
role zstack
Source
BlockUI() { Text("Content"); Button("Action") }Breadcrumb¶
Breadcrumb(items: ["Electronics", "Computer", "Accessories"]) · Breadcrumb { Icon("pi pi-home"); Text(…) }
role breadcrumb · arguments items
Source
Breadcrumb(["One", "Two", "Three"])Button¶
Button("Save", icon: "pi pi-check", severity: "secondary"|"success"|"info"|"warn"|"help"|"danger"|"contrast", variant: "outlined"|"text"|"link", rounded: true, raised: true, size: "small"|"large", loading:, badge:, iconPos: "right"
role button · arguments label · variants outlined, text, link
Source
HStack(alignment: .top, spacing: 16) {
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("link"); Text("link").font(.caption).foregroundStyle(.secondary) }
}ButtonGroup¶
ButtonGroup { Button … } — joined buttons
role toolbar · defaults variant: "group"
Source
ButtonGroup() { Button("Save"); Button("Share") }Calendar¶
Calendar(selection: "2026-11-24") — the inline DatePicker panel (pre-v4 name)
role calendar
Source
Calendar()Card¶
Card(title: "Advanced Card", subtitle: "Card subtitle", image: "…") { content } footer: { Button … }
role card · arguments title
Source
Card("Title") { Text("Content"); Button("Action") }Carousel¶
Carousel { Button(icon: "pi pi-chevron-left", variant: "text", rounded: true); CarouselItem … } + CarouselIndicators
role hstack · defaults spacing: 7
Source
Carousel() { Text("Content"); Button("Action") }CarouselIndicators¶
CarouselIndicators(items: ["", "", ""], selection: 0)
role segmented · arguments items · defaults variant: "indicators"
Source
CarouselIndicators(["One", "Two", "Three"])CarouselItem¶
CarouselItem("Bamboo Watch", image: "…") { price, Tag, buttons }
role card · arguments title · defaults variant: "carousel"
Source
CarouselItem("Title") { Text("Content"); Button("Action") }CascadeSelect¶
CascadeSelect("Select a City", selection: "Sydney", options:)
role select · arguments placeholder
Source
CascadeSelect("Placeholder")Chart¶
Chart(type: "bar"|"line"|"pie"|"doughnut"|"polarArea"|"radar", series:, labels:, seriesNames:) — Chart.js look
role chart
Source
Chart(values: [3, 5, 2, 6, 4])Checkbox¶
Checkbox("Remember me", checked: true) · checked: "indeterminate" · invalid:
role checkbox · arguments label
Source
Checkbox("Label")Chip¶
Chip("Amy Elsner", avatar: "Amy Elsner", avatarImage: "…", icon:, removable: true)
role chip · arguments label
Source
Chip("Label")ColorPicker¶
ColorPicker(colors: ["#10b981"], selection: 0) — the swatch trigger; several colours make a palette
role swatches · arguments colors
Source
ColorPicker()Column¶
Column(header: "Price", alignment: .trailing)
role tablecolumn · arguments header
Source
Column("Header")ConfirmDialog¶
ConfirmDialog(header: "Confirmation", message: "Are you sure you want to proceed?", buttons: ["Cancel", "Delete"], destructive: "Delete", icon:)
role dialog · arguments header · defaults buttons: ["Cancel", "Save"], closable: True, icon: "pi-exclamation-triangle", variant: "confirm"
Source
ConfirmDialog("Header") { Text("Content"); Button("Action") }ConfirmPopup¶
ConfirmPopup(message: "Are you sure?") { target } actions: { Button("Cancel", …); Button("Save", size: "small") }
role tooltip · arguments message · defaults placement: "bottom"
Source
ConfirmPopup("Message") { Text("Content"); Button("Action") }ContextMenu¶
ContextMenu { MenuItem … } — an open context menu; place it with .offset
role menu
Source
ContextMenu() { Button("Open"); Button("Save"); Divider(); Button("Close") }DataTable¶
DataTable(columns: [..] or Column children, rows: [[..]], selectionMode: "multiple", selectedRows: [1], sortField: 2, stripedRows: true, size: "small") header: { … } footer: { Paginator(…) }
role table
| Name | Status |
|---|---|
| Ana Lima | Active |
| Ben Okafor | Away |
Source
DataTable(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])DataView¶
DataView(header: "Products") { DataViewItem(…) } — list layout of items
role list · defaults variant: "dataview"
Source
DataView() { Text("First item"); Text("Second item") }DataViewItem¶
DataViewItem("Bamboo Watch", subtitle: "Accessories", image: "…") { price/actions }
role listitem · arguments title
Source
DataViewItem("Title")DatePicker¶
DatePicker("Select date", selection: "2026-11-24", showIcon: true, label:) · DatePickerPanel for the inline calendar
role datepicker · arguments placeholder
Source
DatePicker("Placeholder")DatePickerPanel¶
DatePickerPanel(selection: "2026-11-24", range: [..]) — DatePicker with inline: true
role calendar
Source
DatePickerPanel()Dialog¶
Dialog(header: "Edit Profile", message: "Update your information.") { … } footer: { Button("Cancel", severity: "secondary"); Button("Save") }
role dialog · arguments header · defaults closable: True
Source
Dialog("Header") { Text("Content"); Button("Action") }Divider¶
Divider() · Divider(label: "OR") · type: "dashed" · layout: "vertical"
role divider · variants solid, dashed, dotted
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Divider().variant("solid"); Text("solid").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Divider().variant("dashed"); Text("dashed").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Divider().variant("dotted"); Text("dotted").font(.caption).foregroundStyle(.secondary) }
}Dock¶
Dock { DockItem("Finder", icon: "pi pi-folder") … } — magnifying app bar
role toolbar · defaults variant: "dock"
Source
Dock() { Button("Save"); Button("Share") }DockItem¶
DockItem("Photos", icon: "pi pi-image", image:)
role avatar · arguments label
Source
DockItem("Label")Drawer¶
Drawer(header: "Menu", position: "left"|"right"|"top"|"bottom") { … }
role dialog · arguments header · defaults closable: True, placement: "left", variant: "drawer"
Source
Drawer("Header") { Text("Content"); Button("Action") }Dropdown¶
Pre-v4 name of Select
role select · arguments placeholder
Source
Dropdown("Placeholder")Editor¶
Editor(rows: 6) — Quill rich text editor with toolbar
role textfield · arguments placeholder · defaults kind: "multiline", variant: "editor"
Source
Editor("Placeholder")Fieldset¶
Fieldset(legend: "Header") { … } — bordered group with a legend on the border
role card · arguments legend · defaults variant: "fieldset"
Source
Fieldset() { Text("Content"); Button("Action") }FileUpload¶
FileUpload { … } — advanced mode content area; children (e.g. FileUploadItem) render inside
role dropzone · arguments label · defaults icon: "pi-cloud-upload", label: "Drag and drop files to here to upload."
Source
FileUpload()FileUploadItem¶
FileUploadItem("report.pdf", subtitle: "1.2 MB", status: "pending"|"completed") { Button(icon: "pi pi-times") }
role listitem · arguments title · defaults icon: "pi-file"
Source
FileUploadItem("Title")FloatLabel¶
FloatLabel("Username", value: "amy") — the label floats on the border
role textfield · arguments label · defaults variant: "float"
Source
FloatLabel("Label")Fluid¶
Fluid { … } — wrapper (children use .frame(maxWidth: .infinity))
role group
Source
Fluid() { Text("Content"); Button("Action") }Galleria¶
Galleria(image: "…", mediaHeight: 280) { HStack { Image(…) … } } — main image + thumbnail strip
role card · defaults variant: "galleria"
Source
Galleria() { Text("Content"); Button("Action") }IconField¶
IconField("Search") — InputText with an InputIcon (icon:)
role textfield · arguments placeholder · defaults icon: "pi-search"
Source
IconField("Placeholder")Image¶
Image(src: "assets/images/photo-1.svg", alt:)
role image · arguments src
Source
Image().frame(width: 160, height: 96)InlineMessage¶
InlineMessage("Username is required", severity: "error") — pre-v4 compact message
role alert · arguments text · defaults severity: "error", variant: "inline"
Source
InlineMessage("Text")Inplace¶
Inplace { display / content } — renders its content
role group
Source
Inplace() { Text("Content"); Button("Action") }InputGroup¶
InputGroup("Price", prefix: "$", suffix: ".00") — InputText between InputGroupAddon cells
role textfield · arguments placeholder
Source
InputGroup("Placeholder")InputMask¶
InputMask("99-999999", value: "48-210771", mask:)
role textfield · arguments placeholder
Source
InputMask("Placeholder")InputNumber¶
InputNumber(value: 1500, prefix: "$", suffix: " kg", trailingIcon: "pi-sort")
role textfield · arguments placeholder · defaults kind: "number"
Source
InputNumber("Placeholder")InputOtp¶
InputOtp(items: ["4", "8", "", ""], selection: 2) — one box per item, the selected focused
role segmented · arguments items · defaults variant: "otp"
Source
InputOtp(["One", "Two", "Three"])InputSwitch¶
Pre-v4 name of ToggleSwitch
role toggle · arguments label
Source
InputSwitch("Label")InputText¶
InputText("Username", value:, label:, icon: "pi pi-search", invalid: true, size: "small"|"large", variant: "filled", disabled:, helper:
role textfield · arguments placeholder · variants filled
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { InputText("Placeholder").variant("filled"); Text("filled").font(.caption).foregroundStyle(.secondary) }
}Knob¶
Knob(value: 60, max: 100) — circular dial with the value in the centre
role progress · arguments value · defaults kind: "circular", showValue: True
Source
Knob(60)ListControls¶
ListControls { Button(icon: "pi pi-angle-up", severity: "secondary") … } — the button column
role vstack · defaults spacing: 7
Source
ListControls() { Text("Content"); Button("Action") }Listbox¶
Listbox(options: ["New York", "Rome", "London"], selection: "Rome") — a bordered option list
role segmented · arguments options · defaults variant: "listbox"
Source
Listbox(["One", "Two"])MegaMenu¶
MegaMenu { MegaMenuItem("Furniture", open: true) { Grid(columns: 3) { MenuGroup … } } }
role toolbar · defaults variant: "menubar"
Source
MegaMenu() { Button("Save"); Button("Share") }MegaMenuItem¶
A MegaMenu root item whose open panel holds MenuGroup columns
role menu · arguments label · defaults variant: "megamenu"
Source
MegaMenuItem("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }Menu¶
Menu { MenuGroup("Documents") { MenuItem("New", icon: "pi pi-plus") } MenuSeparator() } · Menu("Options", open: true) for a popup with its button
role menu · arguments label
Source
Menu("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }MenuGroup¶
MenuGroup("Profile") { MenuItem … } — submenu label + items
role section · arguments label
Source
MenuGroup("Label") { Text("First item"); Text("Second item") }MenuItem¶
MenuItem("Export", icon: "pi pi-upload", shortcut: "⌘+E", badge:) · children make a submenu chevron
role menuitem · arguments label
Source
MenuItem("Label")Menubar¶
Menubar { MenubarItem("File", icon:, open: true) { MenuItem … }; MenubarItem("Help", caret: false) } start: … end: …
role toolbar · defaults variant: "menubar"
Source
Menubar() { Button("Save"); Button("Share") }MenubarItem¶
MenubarItem("Projects", icon: "pi pi-search", open: true) { MenuItem … } · caret: false for a leaf
role menu · arguments label · defaults variant: "menubar"
Source
MenubarItem("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }Message¶
Message("Saved", severity: "success"|"info"|"warn"|"error"|"secondary"|"contrast", icon:, showIcon: true, variant: "simple", size: "small", closable:)
role alert · arguments text · defaults severity: "info", showIcon: False · variants outlined, simple
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Message("Text").variant("outlined"); Text("outlined").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Message("Text").variant("simple"); Text("simple").font(.caption).foregroundStyle(.secondary) }
}MeterGroup¶
MeterGroup(series: [[16], [8], [24]], seriesNames: ["Apps (16%)", "Messages (8%)", "Media (24%)"]) — stacked meter + labels
role chart · defaults chartHeight: 30, grid: False, horizontal: True, kind: "bar", legend: True, stacked: True
Source
MeterGroup(values: [3, 5, 2, 6, 4])MultiSelect¶
MultiSelect("Select Cities", selection: ["Rome", "Paris"], options:, display: "chip", open: true)
role select · arguments placeholder
Source
MultiSelect("Placeholder")OrderList¶
OrderList { ListControls(); Listbox(…) } — reorder buttons beside a list
role hstack · defaults alignment: "top", spacing: 14
Source
OrderList() { Text("Content"); Button("Action") }OverlayBadge¶
OverlayBadge(value: 2, severity: "danger") { Icon("pi pi-bell") }
role badge · arguments value · defaults variant: "overlay"
Source
OverlayBadge("Value")OverlayPanel¶
Pre-v4 name of Popover
role card · arguments title · defaults variant: "popover"
Source
OverlayPanel("Title") { Text("Content"); Button("Action") }Paginator¶
Paginator(count: 12, page: 2, summary: "Showing 11 to 20 of 120") — first/prev/pages/next/last + current page report
role pagination
Source
Paginator()Panel¶
Panel(header: "Header", toggleable: true) { … } footer: { … } extra: { icons }
role card · arguments header · defaults variant: "panel"
Source
Panel("Header") { Text("Content"); Button("Action") }PanelMenu¶
PanelMenu { PanelMenuPanel("Files", icon: "pi pi-file", expanded: true) { MenuItem … } }
role vstack · defaults alignment: "stretch", spacing: 4
Source
PanelMenu() { Text("Content"); Button("Action") }PanelMenuPanel¶
PanelMenuPanel("Cloud", icon: "pi pi-cloud", expanded:) { MenuItem … }
role accordion · arguments label
Source
PanelMenuPanel("Label") { Text("Content"); Button("Action") }Password¶
Password("Password", value:, toggleMask: true, feedback: true) — pair with PasswordMeter for the strength panel
role textfield · arguments placeholder · defaults kind: "password"
Source
Password("Placeholder")PasswordMeter¶
PasswordMeter(value: 66, label: "Medium", color: "medium") — the strength bar of Password's overlay
role progress · arguments value · defaults variant: "meter" · variants weak, medium, strong
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { PasswordMeter(60).variant("weak"); Text("weak").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { PasswordMeter(60).variant("medium"); Text("medium").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { PasswordMeter(60).variant("strong"); Text("strong").font(.caption).foregroundStyle(.secondary) }
}PickList¶
PickList { Listbox(…); ListControls(); Listbox(…) } — source / transfer buttons / target
role hstack · defaults alignment: "center", spacing: 14
Source
PickList() { Text("Content"); Button("Action") }Popover¶
Popover { … } — floating panel with an arrow; place it with .offset
role card · arguments title · defaults variant: "popover"
Source
Popover("Title") { Text("Content"); Button("Action") }ProgressBar¶
ProgressBar(value: 50) · mode: indeterminate when value is omitted · showValue: false
role progress · arguments value · defaults showValue: True
Source
ProgressBar(60)ProgressSpinner¶
ProgressSpinner() — the 4-colour animated ring (drawn static)
role progress · defaults variant: "spinner"
Source
ProgressSpinner()RadioButton¶
RadioButton("Cheese", checked: true)
role radio · arguments label
Source
RadioButton("Label")RadioButtonGroup¶
RadioButtonGroup(options: ["Card", "PayPal"], selection: "Card")
role radiogroup · arguments label
Source
RadioButtonGroup("Label")ScrollPanel¶
ScrollPanel { … }
role scroll
Source
ScrollPanel() { Text("Content"); Button("Action") }ScrollTop¶
ScrollTop() — round button pinned bottom-right
role fab · arguments icon · defaults icon: "pi-arrow-up"
Source
ScrollTop()Select¶
Select("Select a City", options: ["New York", "Rome"], selection: "Rome", open: true, showClear:, invalid:, label:)
role select · arguments placeholder · variants filled
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Select("Placeholder").variant("filled"); Text("filled").font(.caption).foregroundStyle(.secondary) }
}SelectButton¶
SelectButton(options: ["One-Way", "Return"], selection: "Return")
role segmented · arguments options
Source
SelectButton(["One", "Two"])Sidebar¶
Pre-v4 name of Drawer
role dialog · arguments header · defaults closable: True, placement: "left", variant: "drawer"
Source
Sidebar("Header") { Text("Content"); Button("Action") }Skeleton¶
Skeleton().frame(width: 160, height: 14) · shape: "circle"
role skeleton · defaults shape: "rectangle"
Source
Skeleton().frame(width: 160, height: 96)SpeedDial¶
SpeedDial(icon: "pi pi-plus", position: "bottomTrailing", inline: true) — the round primary trigger button
role fab · arguments icon · defaults icon: "pi-plus"
Source
SpeedDial()SplitButton¶
SplitButton("Save", icon: "pi pi-check", severity:) — the default action joined to a chevron-down dropdown button
role button · arguments label · defaults dropdown: True · variants outlined, text
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { SplitButton("Label").variant("outlined"); Text("outlined").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { SplitButton("Label").variant("text"); Text("text").font(.caption).foregroundStyle(.secondary) }
}Splitter¶
Splitter { SplitterPanel { … } SplitterPanel { … } } — gutters drawn between panels
role hstack · defaults alignment: "stretch", spacing: 0
Source
Splitter() { Text("Content"); Button("Action") }SplitterPanel¶
SplitterPanel { … } (.frame(width:) for a fixed size)
role vstack · defaults alignment: "stretch", spacing: 0
Source
SplitterPanel() { Text("Content"); Button("Action") }Step¶
Step("Payment") — a child of Stepper / StepList
role label · arguments title
Source
Step("Title")Stepper¶
Stepper(items: ["Personal", "Seat", "Payment"], current: 1) · Step children · orientation: .vertical
role steps · arguments items
Source
Stepper(["One", "Two", "Three"])Steps¶
Steps(items: ["Personal", "Seat", "Payment"], activeStep: 1) — the pre-v4 numbered steps
role steps · arguments items · defaults variant: "steps"
Source
Steps(["One", "Two", "Three"])Tab¶
Tab("Header I", icon: "pi pi-user") { TabPanel content }
role tab · arguments label
Source
Tab("Label")TabMenu¶
TabMenu(items: [["label": "Dashboard", "icon": "pi pi-home"], …], selection: 0)
role tabs · arguments items · defaults placement: "top", variant: "menu"
Source
TabMenu(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }TabPanel¶
TabPanel("Header I") { … } — pre-v4 TabView child
role tab · arguments header
Source
TabPanel("Header")TabView¶
Pre-v4 Tabs
role tabs · arguments items · defaults placement: "top"
Source
TabView(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }Tabs¶
Tabs(selection: "Header II") { Tab("Header I") { panel } Tab("Header II", icon:, badge:) … } · items: ["A", "B"] for a bar alone
role tabs · arguments items · defaults placement: "top"
Source
Tabs(["One", "Two", "Three"]) { Text("First tab").tabItem { Text("One") }; Text("Second tab").tabItem { Text("Two") } }Tag¶
Tag("Instock", severity: "success"|"info"|"warn"|"danger"|"secondary"|"contrast", icon:, rounded: true)
role badge · arguments value
Source
Tag("Value")Terminal¶
Terminal(code: "$ date\n…")
role code · arguments code · defaults variant: "terminal"
Source
Terminal("let total = items.count")Textarea¶
Textarea("Description", rows: 4, autoResize:)
role textfield · arguments placeholder · defaults kind: "multiline"
Source
Textarea("Placeholder")TieredMenu¶
TieredMenu { MenuItem("File") { MenuItem … } } — nested menus; open a level beside it with .offset
role menu · arguments label
Source
TieredMenu("Label") { Button("Open"); Button("Save"); Divider(); Button("Close") }Timeline¶
Timeline { TimelineEvent("Ordered", time: "15/10/2026 10:30", icon: "pi pi-shopping-cart") … } · layout: "horizontal"
role timeline · variants left, right, alternate
Source
HStack(alignment: .top, spacing: 16) {
VStack(alignment: .leading, spacing: 4) { Timeline() { TimelineItem("Created"); TimelineItem("Shipped") }.variant("left"); Text("left").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Timeline() { TimelineItem("Created"); TimelineItem("Shipped") }.variant("right"); Text("right").font(.caption).foregroundStyle(.secondary) }
VStack(alignment: .leading, spacing: 4) { Timeline() { TimelineItem("Created"); TimelineItem("Shipped") }.variant("alternate"); Text("alternate").font(.caption).foregroundStyle(.secondary) }
}TimelineEvent¶
TimelineEvent("Shipped", time:, description:, icon:, color: "#10b981")
role timelineitem · arguments title
Source
TimelineEvent("Title")Toast¶
Toast(summary: "Success", detail: "File uploaded", severity: "success"|"info"|"warn"|"error"|"secondary"|"contrast", icon:, position: "top-right")
role toast · arguments summary · defaults closable: True, icon: "pi-info-circle", position: "top-right", severity: "info"
Source
Toast("Summary")ToggleButton¶
ToggleButton("Locked", checked: true) · use onLabel/offLabel text as the label
role toggle · arguments label · defaults variant: "button"
Source
ToggleButton("Label")ToggleSwitch¶
ToggleSwitch("Notifications", checked: true)
role toggle · arguments label
Source
ToggleSwitch("Label")Toolbar¶
Toolbar { start buttons; Spacer(); end buttons } — bordered bar
role toolbar
Source
Toolbar() { Button("Save"); Button("Share") }Tooltip¶
Tooltip("Enter your username", placement: .top|.right|.bottom|.left) { target } — v-tooltip
role tooltip · arguments text · defaults placement: "right"
Source
Tooltip("Text") { Text("Content"); Button("Action") }Tree¶
Tree { TreeNode("Documents", icon: "pi pi-folder", expanded: true) { TreeNode(…) } }
role tree
Source
Tree() { TreeItem("Folder") { TreeItem("File") } }TreeNode¶
TreeNode("Work", icon: "pi pi-folder", expanded: true).selected()
role treeitem · arguments label
Source
TreeNode("Label")TreeSelect¶
TreeSelect("Select Item", selection: "Documents / Work")
role select · arguments placeholder
Source
TreeSelect("Placeholder")TreeTable¶
TreeTable(columns:, rows:) — first cells as TreeTableToggle("Documents", level: 1, expanded: true)
role table · defaults variant: "treetable"
| Name | Status |
|---|---|
| Ana Lima | Active |
| Ben Okafor | Away |
Source
TreeTable(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])TreeTableToggle¶
TreeTableToggle("Work", level: 0…3, expanded: true, icon:) — indented first cell with the toggler
role label · arguments title · defaults icon: "pi-chevron-right"
Source
TreeTableToggle("Title")VirtualScroller¶
VirtualScroller { … } — a scroll container
role scroll
Source
VirtualScroller() { Text("Content"); Button("Action") }Core vocabulary in this style¶
Alert¶
role dialog · arguments title · defaults variant: "alert"
Source
Alert("Title") { Text("Content"); Button("Action") }Board¶
Kanban board of BoardColumn children
role board
Source
Board() { BoardColumn("To do") { KanbanCard("Write copy") } }BoardColumn¶
BoardColumn("To do", count:, color:) { KanbanCard(…) }
role boardcolumn · arguments title
Source
BoardColumn("Title") { KanbanCard("Write copy"); KanbanCard("Review") }Callout¶
a numbered annotation; place with .position(x:y:)
role callout · arguments number, text
Source
Callout(1, "Text")CandlestickChart¶
role chart · defaults kind: "candlestick"
Source
CandlestickChart(values: [3, 5, 2, 6, 4])Canvas¶
free-form area; place children with .position(x:y:); grid: .dots|.lines
role canvas
Source
Canvas() { Text("Content"); Button("Action") }.frame(width: 160, height: 96)CodeBlock¶
role code · arguments code · defaults lineNumbers: False
Source
CodeBlock("let total = items.count")CodeEditor¶
CodeEditor("…", language: "swift", lineNumbers:, highlight: [3], tabs: [..])
role code · arguments code
Source
CodeEditor("let total = items.count")Comment¶
author:, time:, avatar:
role message · arguments text · defaults variant: "comment"
Source
Comment("Text")ControlGroup¶
role toolbar · defaults variant: "group"
Source
ControlGroup() { Button("Save"); Button("Share") }DisclosureGroup¶
role accordion · arguments title
Source
DisclosureGroup("Title") { Text("Content"); Button("Action") }EmptyState¶
title, systemImage:, description: { actions }
role emptystate · arguments title
Source
EmptyState("Title")Form¶
role form
Source
Form() { TextField("Name"); Toggle("Notifications", isOn: true) }Gantt¶
scale: ["W1",…], tasks: [("Design", 0, 2, 0.6), …], today:
role gantt
Source
Gantt(tasks: [("Design", 0, 3), ("Build", 2, 5)])Grid¶
Grid of GridRow children, or columns: n
role grid
Source
Grid() { Text("Content"); Button("Action") }GroupBox¶
role card · arguments title
Source
GroupBox("Title") { Text("Content"); Button("Action") }HStack¶
Horizontal stack. spacing:, alignment: .top|.center|.bottom
role hstack
Source
HStack() { Text("Content"); Button("Action") }KanbanCard¶
title, description:, tags: [..], assignees: [..], due:, comments:, priority:
role kanbancard · arguments title
Source
KanbanCard("Title")LabeledContent¶
role labeled · arguments label, value
Source
LabeledContent("Label", "Value") { Text("Content"); Button("Action") }LazyVGrid¶
columns: [GridItem(.flexible()), …] or a count
role grid
Source
LazyVGrid() { Text("Content"); Button("Action") }List¶
.listStyle(.insetGrouped|.plain|.sidebar|…)
role list
Source
List() { Text("First item"); Text("Second item") }Map¶
pins: [(x%, y%, "label")], route:, showsUserLocation:, height:
role map
Source
Map().frame(width: 160, height: 96)MessageBubble¶
MessageBubble("Hi", from: .me|.them, author:, time:, status:, reactions: [..])
role message · arguments text
Source
MessageBubble("Text")NavigationLink¶
role listitem · arguments title · defaults chevron: True
Source
NavigationLink("Title")NavigationSplitView¶
{ sidebar } content: { … } detail: { … }
role split
Source
NavigationSplitView() { Text("Content"); Button("Action") }NavigationStack¶
Content's .navigationTitle / .toolbar form the bar
role navstack
Source
NavigationStack() { Text("Content"); Button("Action") }Picker¶
Picker("Size", selection: "M") { Text("S") … }
role select · arguments label
Source
Picker("Label")Placeholder¶
A labelled box for maps, charts, media
role placeholder · arguments label
Source
Placeholder("Label").frame(width: 160, height: 96)Pointer¶
Pointer(.arrow|.hand|.ibeam|.grab|.crosshair|.touch); place with .position
role pointer · arguments kind
Source
Pointer(.arrow)ProgressView¶
value: 0…1 (or total:); none = indeterminate
role progress · arguments label
Source
ProgressView("Label")RoundedRectangle¶
role shape · defaults shape: "rounded"
Source
RoundedRectangle().frame(width: 160, height: 96)Schedule¶
days: [..], startHour:, endHour:, events: [("Standup", "Mon", 9, 9.5, .blue)], now:
role schedule
Source
Schedule()ScrollView¶
role scroll · arguments axes
Source
ScrollView() { Text("Content"); Button("Action") }SearchField¶
role textfield · arguments placeholder · defaults kind: "search"
Source
SearchField("Placeholder")Section¶
Section("Header") { … } footer: { … }
role section · arguments title
Source
Section("Title") { Text("First item"); Text("Second item") }SecureField¶
role textfield · arguments placeholder · defaults kind: "password"
Source
SecureField("Placeholder")SegmentedControl¶
role segmented · arguments items
Source
SegmentedControl(["One", "Two", "Three"])SelectionRect¶
a drag-selection rectangle; size with .frame, place with .position
role marquee
Source
SelectionRect()Sheet¶
role dialog · arguments title · defaults variant: "sheet"
Source
Sheet("Title") { Text("Content"); Button("Action") }Sparkline¶
role chart · arguments values · defaults kind: "sparkline"
Source
Sparkline([3, 5, 2, 6, 4], values: [3, 5, 2, 6, 4])Spreadsheet¶
rows: [[…]], selection: "B2:C4", active:, formula:, sheets: [..], highlight: ["B3": .yellow]
role spreadsheet
| A | B | |
|---|---|---|
| 1 | A | B |
| 2 | 1 | 2 |
| 3 | 3 | 4 |
Source
Spreadsheet(columns: ["A", "B"], rows: [[1, 2], [3, 4]])Stat¶
Stat("Revenue", "$48k", change: "+12%", trend: [..], systemImage:)
role stat · arguments label, value
Source
Stat("Label", 60)StickyNote¶
StickyNote("Call Ana", color: .yellow, rotation: -2, author:)
role stickynote · arguments text
Source
StickyNote("Text")Table¶
columns: ["Name", …], rows: [[…], …] or TableRow children
role table
| Name | Status |
|---|---|
| Ana Lima | Active |
| Ben Okafor | Away |
Source
Table(columns: ["Name", "Status"], rows: [["Ana Lima", "Active"], ["Ben Okafor", "Away"]])Text¶
Text with bold, italic, code Markdown
role text · arguments content
Source
Text("Content")TextEditor¶
role textfield · arguments text · defaults kind: "multiline"
Source
TextEditor("Text")TextField¶
TextField("Placeholder", text: "value")
role textfield · arguments placeholder
Source
TextField("Placeholder")TimelineItem¶
title, time:, description:, systemImage:, status:
role timelineitem · arguments title
Source
TimelineItem("Title")ToolbarItem¶
ToolbarItem(placement: .topBarTrailing) { … }
role toolbaritem
Source
ToolbarItem() { Text("Content"); Button("Action") }ToolbarItemGroup¶
role toolbaritem
Source
ToolbarItemGroup() { Text("Content"); Button("Action") }TreeItem¶
label, systemImage:, folder:, expanded:, selected:, detail:
role treeitem · arguments label
Source
TreeItem("Label")VStack¶
Vertical stack. spacing:, alignment: .leading|.center|.trailing
role vstack
Source
VStack() { Text("Content"); Button("Action") }VideoPlayer¶
poster image, progress: 0…1, time:, duration:, playing:
role media · arguments image
Source
VideoPlayer().frame(width: 160, height: 96)Whiteboard¶
role canvas · defaults grid: "dots"
Source
Whiteboard() { Text("Content"); Button("Action") }.frame(width: 160, height: 96)ZStack¶
Overlapping layers. alignment:
role zstack
Source
ZStack() { Text("Content"); Button("Action") }