More design systems
Sway.Widgets has no look of its own, so every visual style is a package you reference. Besides
Material 3 and IBM Carbon, the repository has two more full component sets and one set of
design tokens. They follow the same shape: an app widget (FioriApp, ShopifyApp) that installs a theme and follows
the OS light/dark preference, a theme object read with XxxTheme.Of(context), and components that read semantic
tokens rather than fixed colours.
Design systems are independent. You can nest one inside another in the same app, which is how the demo mixes Material 3 with Carbon and Shopify pages.
SAP Fiori (Sway.Extras.Fiori)
Follows the SAP Digital Design System. It is the largest of the packages.
using Sway.Extras.Fiori;
App.Run(new FioriApp(home: new MyHome()), "App", 1100, 760);
FioriApp takes theme and darkTheme (FioriThemeData), themeMode (System by default), textDirection,
locale and localizationsDelegates. Themes are Morning (light) and Evening (dark).
| Layer | What is in it |
|---|---|
| Foundations | FioriPalette colour ramps, semantic FioriColors, the FioriType scale, FioriSpacing, 12-column breakpoints (FioriBreakpoints), FioriMotion, icons, accessibility and RTL helpers. |
| Components | Buttons, text fields, text area, password, number, phone (with flags), search and auto-suggest inputs, date and date-range pickers, checkbox, radio, switch, sliders, dropdown and select box, link, tooltip, popover, toast, avatars, badges, tags, tiles, lists, breadcrumb, pagination, carousel, skeleton and loading indicators, progress bar, code block, image editor, spreadsheet-style FioriSheet. |
| Patterns | FioriMasthead, FioriSideNavigation and FioriAppShell (compact below 600 px), FioriTable<T> (sort, search, paging, pinned columns, resize, reorder), charts (column, line, donut, radial), FioriModal, FioriMessageStrip, FioriAccordion, FioriContactWidget, FioriCookieConsent, FioriEventRibbon. |
Fiori's typeface, 72 Brand, is proprietary. The package embeds Noto Sans as a stand-in; register your licensed copy as
"72 Brand" with FontCache.RegisterFace before building the theme to use the real font.
Some token assignments (surface and border steps, the Evening mapping) are derived rather than published by SAP, and
High Contrast themes are not implemented. The notes next to the code list exactly what is verified and what is not:
FOUNDATIONS.md, plus
COMPONENTS-*.md and PATTERNS-*.md in the Components and Patterns folders.
Shopify-style commerce (Sway.Extras.Shopify)
Storefront components in the Shopify design language, built phone-first: 44 px touch targets, a 2/3/4-column product grid that reflows with width, and a bottom sheet and bottom navigation bar for small screens.
using Sway.Extras.Shopify;
App.Run(new ShopifyApp(home: new Storefront()), "Shop", 420, 800);
ShopifyApp has a light (cream) and a dark (cinematic) theme, selected like the others with themeMode.
| Area | Widgets |
|---|---|
| Actions and fields | ShopifyButton, ShopifyIconButton, ShopifyTextField, ShopifySearchField, ShopifyTag, ShopifyCountBadge |
| Product | ShopifyProductCard, ShopifyProductGrid, ShopifyPrice, ShopifyRating, ShopifyQuantityStepper, ShopifyOptionChips<T>, ShopifySwatchPicker<T> |
| Cart and checkout | ShopifyCartLine, ShopifyOrderSummary, ShopifyFreeShippingBar, ShopifyCheckoutSteps, ShopifyEmptyState |
| Page chrome | ShopifyAnnouncementBar, ShopifyHeader, ShopifyBottomNavBar, ShopifyHero, ShopifySectionHeader, ShopifyAccordion, ShopifySheet |
The package embeds Inter and Inter Display (SIL OFL) as an open stand-in for Neue Haas Grotesk, and uses an installed Neue Haas if it finds one. The aloe and pistachio greens exist only on the light theme. The design reference is DESIGN-shopify.md.
Blueprint (Sway.Extras.Blueprint)
Early. The package currently holds only the Blueprint colour scales (BpColors) and type tokens (BpTypography), with
no app widget or components yet.
Writing your own
A design system needs no support from the core. Build it from the neutral pieces in Sway.Widgets: Interactive
for hover, press and focus, EditableText for text input, Icon, Overlay, the animation widgets and Localizations.
Provide an app widget that installs your theme with an InheritedWidget, follows
WidgetsBinding.PlatformBrightness, and sets Directionality from the locale. Sway.Extras.Ibm is the smallest
complete example to copy.