Fluent (WinUI 3)¶
The fluent pack imitates Windows 11 desktop apps built with WinUI 3 (Windows App SDK 1.8) in the Fluent 2 design language: Mica window backgrounds, content layers with an 8 px corner, 32 px controls with 4 px corners and the darker "elevation" bottom edge, accent-pill selection indicators, and the Segoe UI Variable type ramp (Caption 12 · Body 14 · BodyStrong 14 · Subtitle 20 · Title 28 · TitleLarge 40 · Display 68).
Select it with import WinUI (also FluentUI, Fluent, WindowsAppSDK, Microsoft.UI.Xaml) or
pack="fluent" on the fence. Elements use the WinUI names: NavigationView, NavigationViewItem,
TitleBar, CommandBar, AppBarButton, Button (.accent / .standard / .subtle),
ToggleSwitch, CheckBox, RadioButtons, ComboBox, TextBox, PasswordBox, NumberBox,
AutoSuggestBox, CalendarDatePicker, InfoBar, InfoBadge, TeachingTip, ContentDialog,
MenuFlyout, MenuBar, ListView, TreeView, TabView, SelectorBar, BreadcrumbBar,
Expander, the Community Toolkit's SettingsCard, SettingsExpander and DataGrid, and more —
mockitdown elements fluent lists them all. TextBlock(style: .subtitleTextBlockStyle) (or
.font(.subtitle)) uses the Fluent type ramp. Icons accept Fluent / Segoe Fluent Icons names such as
"Home", "Mail", "Settings" or "Accept".
Controls¶
The basic input controls in their rest, checked and focused states.
Source
import WinUI
StackPanel(spacing: 20) {
StackPanel(spacing: 8, orientation: .horizontal) {
Button("Accent").buttonStyle(.accent)
Button("Standard")
Button("Subtle", icon: "Settings").buttonStyle(.subtle)
HyperlinkButton("Learn more")
ToggleButton("Bold", selected: true)
DropDownButton("Sort", icon: "Sort")
SplitButton("Color")
}
StackPanel(spacing: 32, orientation: .horizontal) {
ToggleSwitch("Wi-Fi", isOn: true)
ToggleSwitch("Airplane mode")
StackPanel(spacing: 0) {
CheckBox("Remember me", checked: true)
CheckBox("Select all", checked: .indeterminate)
CheckBox("Unchecked")
}
RadioButtons("Theme", items: ["Light", "Dark", "Use system setting"], selection: "Dark")
}
StackPanel(spacing: 16, orientation: .horizontal) {
TextBox("Display name", text: "Ana Diaz").state(.focused).frame(width: 220)
NumberBox("Copies", text: "2").spinButtonPlacementMode(.inline).frame(width: 140)
ComboBox("Font size", items: ["12", "14", "16"], selection: "14").frame(width: 140)
AutoSuggestBox("Search").frame(width: 200)
}
StackPanel(spacing: 24, orientation: .horizontal) {
Slider("Volume", value: 60, in: 0...100).frame(width: 200)
RatingControl(3.5)
ProgressBar(value: 0.6).frame(width: 160)
ProgressRing(value: 0.7)
ProgressRing()
InfoBadge(8)
InfoBadge(3).variant(.critical)
InfoBadge()
PipsPager(count: 5, page: 2)
}
}
.padding(24)Sign-in dialog¶
A ContentDialog over an app window: the title and content sit on the dialog layer, the buttons on
the darker footer, and the default button uses the accent style.
Source
import WinUI
StackPanel(spacing: 12) {
TextBlock("Welcome to Contoso", style: .titleTextBlockStyle)
TextBlock("Sign in to sync your projects across devices.").foregroundStyle(.secondary)
Button("Sign in").buttonStyle(.accent)
}
.padding(40)
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
ContentDialog("Sign in to Contoso", buttons: ["Sign in", "Cancel"], primary: "Sign in") {
TextBox("Email", text: "ana.diaz@contoso.com")
PasswordBox("Password", text: "hunter22").state(.focused)
HStack {
CheckBox("Keep me signed in", checked: true)
Spacer()
HyperlinkButton("Forgot password?")
}
}Form with validation¶
TextBox, NumberBox, CalendarDatePicker, TimePicker, ComboBox, RadioButtons and a
RichEditBox, with InfoBars reporting the state of the form.
Source
import WinUI
ScrollViewer {
StackPanel(spacing: 16) {
TextBlock("New event", style: .titleTextBlockStyle)
InfoBar("Conflict", message: "You already have “Design review” from 10:00 to 11:00.", severity: .warning)
TextBox("Title", text: "Quarterly planning").frame(maxWidth: .infinity)
Grid(columns: 3, spacing: 16) {
CalendarDatePicker("Date", date: "2026-11-23")
TimePicker("Start", value: "10:30 AM")
NumberBox("Duration (min)", text: "90").spinButtonPlacementMode(.compact)
}
Grid(columns: 2, spacing: 16) {
ComboBox("Calendar", items: ["Work", "Personal"], selection: "Work")
TextBox("Location", placeholder: "Add a room or location", description: "Rooms in Building 25 are listed first.")
}
RadioButtons("Show as", items: ["Free", "Tentative", "Busy", "Away"], selection: "Busy", orientation: .horizontal)
RichEditBox("Notes", text: "Agenda: review OKRs, staffing, budget for next quarter.", rows: 3)
CheckBox("Request responses", checked: true)
InfoBar("Invitations sent", message: "Attendees will get an email when you save.", severity: .success, isClosable: false)
HStack {
Spacer()
Button("Cancel")
Button("Save").buttonStyle(.accent)
}
}
.padding(32)
}Settings page¶
The Windows 11 Settings pattern: a custom TitleBar, a NavigationView whose pane sits on Mica,
and a page on the content layer with a BreadcrumbBar title, SettingsCards and an expanded
SettingsExpander. The rows are custom components from mockups/fluent/components.mockitdown
(SettingToggle, SettingChoice, SettingLink).
Source
import WinUI
import "fluent/components"
TitleBar("Settings", logo: "Settings", back: true)
NavigationView {
HStack(spacing: 12) {
PersonPicture("Ana Diaz", image: "assets/images/avatar-2.svg", size: .large)
VStack(alignment: .leading, spacing: 0) {
TextBlock("Ana Diaz", style: .bodyStrong)
TextBlock("ana.diaz@contoso.com", style: .caption).foregroundStyle(.secondary)
}
}
.padding(.horizontal, 12)
.padding(.vertical, 8)
AutoSuggestBox("Find a setting")
NavigationViewItem("Home", icon: "Home")
NavigationViewItem("System", icon: "System").selected()
NavigationViewItem("Bluetooth & devices", icon: "Devices")
NavigationViewItem("Network & internet", icon: "Network")
NavigationViewItem("Personalization", icon: "Personalization")
NavigationViewItem("Apps", icon: "Apps")
NavigationViewItem("Accounts", icon: "Accounts")
NavigationViewItem("Time & language", icon: "TimeLanguage")
NavigationViewItem("Privacy & security", icon: "Privacy")
NavigationViewItem("Windows Update", icon: "WindowsUpdate", badge: 1)
} content: {
ScrollViewer {
StackPanel(spacing: 4) {
BreadcrumbBar(["System", "Display"]).variant(.title).padding(.bottom, 20)
SettingChoice(header: "Scale", description: "Change the size of text, apps and other items",
icon: "Zoom", items: ["100%", "125% (Recommended)", "150%"], selection: "125% (Recommended)")
SettingLink(header: "Display resolution", description: "Adjust the resolution to fit your connected display",
icon: "Display", value: "2560 × 1600")
SettingToggle(header: "Night light", description: "Use warmer colors to help block blue light",
icon: "NightLight", isOn: true)
SettingsExpander("HDR", description: "More about HDR", icon: "Brightness", expanded: true) {
SettingToggle(header: "Use HDR", isOn: false)
SettingToggle(header: "Play streaming HDR video", isOn: true)
SettingsCard("Display capabilities", description: "Supported") {
HyperlinkButton("Learn more")
}
}
TextBlock("Related settings", style: .bodyStrong).padding(.top, 24).padding(.bottom, 4)
SettingLink(header: "Advanced display", description: "Display information, refresh rate", icon: "Display")
SettingLink(header: "Graphics", icon: "Gaming")
}
.padding(.horizontal, 40)
.padding(.vertical, 28)
}
}Mail¶
A compact NavigationView (.paneDisplayMode(.leftCompact)) with InfoBadges, a CommandBar, a
ListView of custom MailItem rows and a reading pane.
Here are the slides for tomorrow's review. Please add your team's top three priorities to slide 6 before 5 pm so we can consolidate them.
Thanks,
Kenji
File Explorer with an open menu¶
A CommandBar whose New button has its MenuFlyout open, a BreadcrumbBar address bar,
a TreeView navigation pane and a DataGrid details view — plus a ToolTip.
| Name | Date modified | Type | Size |
|---|---|---|---|
| Brand refresh | 11/20/2026 4:12 PM | File folder | |
| Contoso app | 11/18/2026 9:03 AM | File folder | |
| Budget 2027.xlsx | 11/22/2026 6:40 PM | Microsoft Excel Worksheet | 48 KB |
| Kickoff notes.docx | 11/21/2026 11:15 AM | Microsoft Word Document | 22 KB |
| Roadmap.pptx | 11/23/2026 10:42 AM | Microsoft PowerPoint Presentation | 4,210 KB |
| todo.txt | 11/23/2026 8:01 AM | Text Document | 1 KB |
Source
import WinUI
VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 4) {
Button(icon: "Back").buttonStyle(.subtle)
Button(icon: "Forward").buttonStyle(.subtle)
Button(icon: "arrow.up").buttonStyle(.subtle)
Button(icon: "Refresh").buttonStyle(.subtle)
HStack {
FontIcon("Folder")
BreadcrumbBar(["This PC", "Documents", "Projects"])
Spacer()
}
.padding(.horizontal, 10)
.frame(height: 32, maxWidth: .infinity)
.background(.surface)
.border(.separator)
.cornerRadius(4)
Border { AutoSuggestBox("Search Projects") }.frame(width: 260)
}
.frame(maxWidth: .infinity)
.padding(.horizontal, 8)
.padding(.vertical, 6)
CommandBar {
MenuFlyout("New", icon: "Add", open: true) {
MenuFlyoutItem("Folder", icon: "Folder", shortcut: "Ctrl+Shift+N")
MenuFlyoutItem("Shortcut", icon: "link")
MenuFlyoutSeparator()
MenuFlyoutItem("Text Document", icon: "Document")
MenuFlyoutItem("Microsoft Excel Worksheet", icon: "chart.bar")
MenuFlyoutSubItem("More") { MenuFlyoutItem("Bitmap image") }
}
.variant(.appBar)
AppBarSeparator()
AppBarButton(icon: "Cut")
AppBarButton(icon: "Copy")
AppBarButton(icon: "Rename")
AppBarButton(icon: "Share")
AppBarButton(icon: "Delete")
AppBarSeparator()
ToolTip("Sort items (Ctrl+Shift+S)", placement: .bottom) {
AppBarButton("Sort", icon: "Sort")
}
AppBarButton("View", icon: "View")
Spacer()
AppBarButton("Details", icon: "info.circle")
}
.padding(.horizontal, 4)
.frame(maxWidth: .infinity)
HStack(alignment: .top, spacing: 0) {
TreeView {
TreeViewItem("Home", icon: "Home")
TreeViewItem("Gallery", icon: "Gallery")
TreeViewItem("OneDrive - Contoso", icon: "OneDrive")
TreeViewItem("This PC", icon: "ThisPC", expanded: true) {
TreeViewItem("Desktop", icon: "Desktop")
TreeViewItem("Documents", icon: "Folder", expanded: true) {
TreeViewItem("Projects", icon: "Folder").selected()
TreeViewItem("Receipts", icon: "Folder")
}
TreeViewItem("Downloads", icon: "Downloads")
TreeViewItem("Music", icon: "Music")
TreeViewItem("Pictures", icon: "Pictures")
}
TreeViewItem("Network", icon: "Network")
}
.frame(width: 248, maxHeight: .infinity)
DataGrid(columns: ["Name", "Date modified", "Type", "Size"],
rows: [["Brand refresh", "11/20/2026 4:12 PM", "File folder", ""],
["Contoso app", "11/18/2026 9:03 AM", "File folder", ""],
["Budget 2027.xlsx", "11/22/2026 6:40 PM", "Microsoft Excel Worksheet", "48 KB"],
["Kickoff notes.docx", "11/21/2026 11:15 AM", "Microsoft Word Document", "22 KB"],
["Roadmap.pptx", "11/23/2026 10:42 AM", "Microsoft PowerPoint Presentation", "4,210 KB"],
["todo.txt", "11/23/2026 8:01 AM", "Text Document", "1 KB"]],
selectedRows: [4])
.frame(maxWidth: .infinity)
.padding(.trailing, 8)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
HStack {
TextBlock("6 items 1 item selected 4.11 MB", style: .caption)
Spacer()
}
.padding(.horizontal, 16)
.padding(.vertical, 4)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)Document editor¶
A Notepad-style editor: a TabView of documents with close buttons, a MenuBar with the Edit
menu open (ToggleMenuFlyoutItem, sub-items, shortcuts) and a status bar.
Dashboard with a teaching tip¶
NavigationView in Top mode, StatCard components with ProgressRings, a chart card, a
DataGrid and a TeachingTip pointing at a new feature.
| Order | Customer | Region | Status | Amount |
|---|---|---|---|---|
| #10482 | Fabrikam | Europe | Shipped | $12,400 |
| #10481 | Northwind Traders | North America | Processing | $8,150 |
| #10480 | Tailspin Toys | Asia Pacific | Shipped | $3,920 |
| Order | Customer | Region | Status | Amount |
|---|---|---|---|---|
| #10482 | Fabrikam | Europe | Shipped | $12,400 |
| #10481 | Northwind Traders | North America | Processing | $8,150 |
| #10480 | Tailspin Toys | Asia Pacific | Shipped | $3,920 |
Source
import WinUI
import "fluent/components"
NavigationView {
TextBlock("Contoso Analytics", style: .bodyStrong).padding(.horizontal, 12)
NavigationViewItem("Overview", icon: "Home").selected()
NavigationViewItem("Reports", icon: "Document")
NavigationViewItem("Customers", icon: "People")
NavigationViewItem("Billing", icon: "creditcard")
Spacer()
AutoSuggestBox("Search")
PersonPicture("Ana Diaz", size: .small)
} content: {
ScrollViewer {
StackPanel(spacing: 16) {
HStack {
TextBlock("Overview", style: .titleTextBlockStyle)
Spacer()
SelectorBar(selection: "Month") {
SelectorBarItem("Day")
SelectorBarItem("Week")
SelectorBarItem("Month")
SelectorBarItem("Year")
}
TeachingTip("Export is here", placement: .bottomLeft, subtitle: "Send any view to Excel or Power BI with one click.") {
DropDownButton("Export", icon: "Share")
} actions: {
HStack {
Button("Try it").buttonStyle(.accent)
Button("Got it")
}
}
}
InfoBar("Sync complete", message: "Data refreshed 2 minutes ago.", severity: .success)
HStack(spacing: 16) {
StatCard(title: "Revenue", value: "$1.24M", detail: "82% of Q4 goal", progress: 0.82)
StatCard(title: "Active users", value: "48,210", detail: "+6.4% vs October", progress: 0.64)
StatCard(title: "Tickets resolved", value: "1,932", detail: "93% within SLA", progress: 0.93)
}
HStack(alignment: .top, spacing: 16) {
Card("Revenue by month", subtitle: "Thousands of USD") {
Chart(kind: .bar, series: [[120, 135, 128, 160, 172, 190, 205, 198], [100, 110, 115, 130, 150, 160, 170, 180]],
labels: ["Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov"], height: 150)
}
.frame(maxWidth: .infinity)
Card("Top regions") {
LabeledContent("North America", value: "$512K")
ProgressBar(value: 0.8)
LabeledContent("Europe", value: "$388K")
ProgressBar(value: 0.6)
LabeledContent("Asia Pacific", value: "$241K")
ProgressBar(value: 0.38)
}
}
DataGrid(title: "Recent orders", columns: ["Order", "Customer", "Region", "Status", "Amount"],
rows: [["#10482", "Fabrikam", "Europe", "Shipped", "$12,400"],
["#10481", "Northwind Traders", "North America", "Processing", "$8,150"],
["#10480", "Tailspin Toys", "Asia Pacific", "Shipped", "$3,920"]])
}
.padding(.horizontal, 32)
.padding(.vertical, 24)
}
}
.paneDisplayMode(.top)