Angular Material¶
The angular-material pack imitates Angular Material 20 with its default Material 3
theme (the azure palette: primary #005cbb light, #abc7ff dark), Roboto and the M3 type scale,
pill-shaped buttons, 12 px cards, 28 px dialogs, filled and outlined form fields and tonal surfaces.
Select it with import AngularMaterial (or import Angular).
Elements use the component names of the library with the Mat prefix in PascalCase:
MatToolbar, MatSidenavContainer / MatSidenav, MatNavList, MatList / MatListItem,
MatCard, MatButton (variant: "text" | "filled" | "tonal" | "outlined" | "elevated", as
matButton="…"), MatIconButton, MatFab / MatMiniFab / MatExtendedFab,
MatButtonToggleGroup, MatFormField (.appearance(.outline); label, helper = mat-hint,
error = mat-error), MatSelect, MatAutocomplete, MatCheckbox, MatRadioGroup,
MatSlideToggle, MatSlider, MatChipSet / MatChipListbox / MatChipGrid with MatChip,
MatChipOption, MatChipRow, MatDatepicker, MatTimepicker, MatCalendar, MatTable,
MatSortHeader, MatPaginator, MatTabGroup / MatTab, MatTabNavBar, MatStepper / MatStep,
MatAccordion / MatExpansionPanel, MatMenu / MatMenuItem, MatDialog, MatBottomSheet,
MatSnackBar, MatTooltip, MatProgressBar, MatProgressSpinner, MatBadge, MatDivider,
MatIcon, MatTree, MatGridList. Material Icons / Symbols names (more_vert, receipt_long,
notifications) work as icon names. The core SwiftUI vocabulary (VStack, Text, Button,
NavigationStack, …) keeps working and picks up the Material 3 look.
The custom components used below (AdminShell, StatCard, ContactRow, ToggleRow) live in
mockups/angular-material/shell.mockitdown and are imported with import "angular-material/shell".
Sign in¶
Source
import AngularMaterial
VStack {
Spacer()
VStack {
MatCard {
VStack(alignment: .leading, spacing: 4) {
Text("Sign in").font(.headlineSmall)
Text("Use your Acme account").font(.bodyMedium).foregroundStyle(.secondary)
}
.padding(.bottom, 8)
MatFormField("Email", text: "dana.ruiz@acme.io", systemImage: "mail").appearance(.outline)
MatFormField("Password", text: "hunter2hunter2", kind: .password, trailingIcon: "visibility_off",
helper: "At least 12 characters").appearance(.outline)
HStack {
MatCheckbox("Keep me signed in", checked: true)
Spacer()
MatButton("Forgot password?")
}
MatButton("Sign in", variant: "filled").frame(maxWidth: .infinity)
MatDivider(label: "or")
MatButton("Continue with SSO", systemImage: "key", variant: "outlined").frame(maxWidth: .infinity)
}
.appearance(.outlined)
}
.frame(width: 380)
Spacer()
}
.frame(maxWidth: .infinity, maxHeight: .infinity)Admin dashboard¶
The shell is a MatToolbar above a MatSidenavContainer whose MatNavList marks the active
route; the dashboard is a grid of raised MatCards.
Orders table¶
MatTable with row selection (a SelectionModel column), a matSort header, a filter field and
MatChipListbox filters above it and a MatPaginator below.
| Order | Customer | Date | Status | Total | |
|---|---|---|---|---|---|
| #1042 | Ana Lima | Nov 23, 2026 | Paid | $129.00 | |
| #1039 | Lima Foods Ltd. | Nov 22, 2026 | Shipped | $2,480.00 | |
| #1031 | Paulo Lima | Nov 20, 2026 | Paid | $64.50 | |
| #1027 | Lima & Sons | Nov 18, 2026 | Shipped | $910.00 | |
| #1019 | Rita Lima | Nov 15, 2026 | Paid | $38.00 |
Source
import AngularMaterial
import "angular-material/shell"
AdminShell(active: "Orders") {
VStack(alignment: .leading, spacing: 16) {
HStack {
Text("Orders").font(.headlineSmall)
Spacer()
MatButton("Import", systemImage: "file_upload", variant: "outlined")
MatButton("New order", systemImage: "add", variant: "filled")
}
HStack(spacing: 16) {
MatFormField("Filter", text: "lima", systemImage: "search", clearable: true).appearance(.outline).frame(width: 320)
MatChipListbox {
MatChipOption("Paid", selected: true)
MatChipOption("Pending")
MatChipOption("Shipped", selected: true)
MatChipOption("Refunded")
}
Spacer()
MatTooltip("Columns") { MatIconButton("view_column") }
}
MatTable(columns: ["Order", "Customer", "Date", "Status", MatSortHeader("Total")],
rows: [
["#1042", "Ana Lima", "Nov 23, 2026", MatChip("Paid", systemImage: "check_circle"), "$129.00"],
["#1039", "Lima Foods Ltd.", "Nov 22, 2026", MatChip("Shipped", systemImage: "local_shipping"), "$2,480.00"],
["#1031", "Paulo Lima", "Nov 20, 2026", MatChip("Paid", systemImage: "check_circle"), "$64.50"],
["#1027", "Lima & Sons", "Nov 18, 2026", MatChip("Shipped", systemImage: "local_shipping"), "$910.00"],
["#1019", "Rita Lima", "Nov 15, 2026", MatChip("Paid", systemImage: "check_circle"), "$38.00"]
],
selectable: true, selectedRows: [1, 3], sortColumn: "Total",
footer: { MatPaginator("1 – 5 of 23") })
}
}Registration stepper¶
A horizontal MatStepper: completed steps show a check, the current step's content follows the
header. Fields mix the fill (default) and outline appearances.
Settings¶
Slide toggles, a MatSelect, a MatButtonToggleGroup, a MatSlider, radio buttons and checkboxes
inside MatTabNavBar sections.
Source
import AngularMaterial
import "angular-material/shell"
AdminShell(active: "Settings") {
VStack(alignment: .leading, spacing: 16) {
Text("Settings").font(.headlineSmall)
MatTabNavBar(items: ["General", "Notifications", "Billing", "Security"], selection: 0).variant(.start)
HStack(alignment: .top, spacing: 16) {
MatCard(title: "Preferences") {
ToggleRow(title: "Dark theme", detail: "Use the dark palette across the console", on: true)
ToggleRow(title: "Compact density", detail: "Show more rows in tables")
ToggleRow(title: "Weekly digest", detail: "Email a summary every Monday", on: true)
MatDivider()
MatSelect("Language", options: ["English (US)", "Português", "Deutsch"], value: "English (US)")
.appearance(.outline)
MatSelect("Time zone", value: "Europe/Lisbon (GMT+0)", helper: "Used for reports and schedules")
.appearance(.outline)
}
.appearance(.outlined)
.frame(maxWidth: .infinity)
MatCard(title: "Display") {
Text("Start page").font(.titleSmall)
MatButtonToggleGroup(items: ["Dashboard", "Orders", "Reports"], value: "Orders")
Text("Text size").font(.titleSmall)
MatSlider(value: 60, in: 0...100, ticks: 5, minLabel: "A", maxLabel: "A")
MatRadioGroup("Currency format", options: ["$1,234.56", "1.234,56 $", "1 234,56 $"], value: "$1,234.56")
MatCheckbox("Show prices with tax", checked: true)
MatCheckbox("Round to whole numbers")
} actions: {
MatButton("Reset")
MatButton("Save changes", variant: "filled")
}
.appearance(.outlined)
.frame(maxWidth: .infinity)
}
.frame(maxWidth: .infinity)
}
}Mobile: contacts¶
A phone layout with a MatToolbar, a filter MatChipSet, a two-line MatList with subheaders and
an extended MatFab.
Source
import AngularMaterial
import "angular-material/shell"
VStack(alignment: .stretch, spacing: 0) {
MatToolbar("Contacts", menu: true) {
MatIconButton("search")
MatIconButton("more_vert")
}
ScrollView(.horizontal) {
MatChipSet {
MatChipOption("All", selected: true)
MatChipOption("Favorites")
MatChipOption("Work")
MatChipOption("Family")
}
}
.padding(.horizontal, 16)
.padding(.bottom, 8)
MatList {
MatListSubheader("Favorites")
ContactRow(name: "Ana Lima", line: "Product designer · Lisbon", meta: "9:41")
ContactRow(name: "Ben Ode", line: "On a call until 11:00", meta: "Mon")
MatDivider()
MatListSubheader("All contacts")
ContactRow(name: "Chloe Wu", line: "Sent you the Q4 report")
ContactRow(name: "Diego Marín", line: "Engineering · Madrid")
ContactRow(name: "Eva Novak", line: "Customer success")
ContactRow(name: "Farid Haddad", line: "Sales · Dubai")
ContactRow(name: "Grace Park", line: "Marketing")
}
.frame(maxHeight: .infinity)
MatExtendedFab("New contact", icon: "person_add")
}
.frame(maxHeight: .infinity)Row menu, tooltip and snack bar¶
An open MatMenu on a card's overflow button, a MatTooltip, a MatProgressBar and a
MatSnackBar confirming an action. The file tree on the left is a MatTree.
Dialog with calendar and time picker¶
An open MatDialog (28 px corners, headline, actions on the end) over a page; it holds outlined
fields, a MatCalendar and a MatTimepicker.
Help center: tabs and expansion panels¶
Source
import AngularMaterial
VStack(alignment: .stretch, spacing: 0) {
MatToolbar("Help center", color: "primary", navigationIcon: "arrow_back") {
MatIconButton("search")
}
MatTabGroup(selection: 1) {
MatTab("Getting started", systemImage: "rocket_launch") { Text("…") }
MatTab("Billing", systemImage: "credit_card") {
HStack(alignment: .top, spacing: 24) {
MatAccordion {
MatExpansionPanel("How do I change my plan?", description: "Plans and upgrades")
MatExpansionPanel("When am I charged?", description: "Billing cycle", expanded: true) {
Text("You are charged on the first day of each billing period. Annual plans are charged once a year on the day you subscribed.")
HStack {
Spacer()
MatButton("Contact billing")
MatButton("View invoices", variant: "tonal")
}
}
MatExpansionPanel("Can I get a refund?", description: "Within 30 days")
MatExpansionPanel("Which payment methods are accepted?", description: "Cards, SEPA, PayPal")
}
.frame(maxWidth: .infinity)
MatCard(title: "Still need help?", subtitle: "We reply within a day") {
MatProgressSpinner(value: 0.7)
Text("Current wait time: about 4 minutes.")
} actions: {
MatButton("Start a chat", systemImage: "chat", variant: "filled")
}
.appearance(.filled)
.frame(width: 300)
}
.padding(24)
}
MatTab("Account", systemImage: "person") { Text("…") }
MatTab("Developers", systemImage: "code") { Text("…") }
}
.frame(maxHeight: .infinity)
}
.frame(maxHeight: .infinity)