Ui
35 documents
Always show progress
When the UI is waiting on an async task:
Android edge-to-edge and window insets
Render Android apps edge-to-edge and consume WindowInsets so content is never hidden behind the status bar, navigation bar, or IME.
Android navigation in Compose
Use type-safe Navigation Compose with serializable routes, single-activity architecture, and hoisted nav state.
Android predictive back
Migrate off deprecated back handling to OnBackPressedDispatcher and support the predictive back gesture with progress-driven animations.
Animation & Motion
Motion should be purposeful — guide attention, show spatial relationships, and provide
Apple design language and widgets
Adopt the system Apple design language and materials over custom chrome, and version-gate brand-new design APIs like Liquid Glass.
Color
Use color with intention — never as the sole means of conveying information.
Core Web Vitals and performance budgets
Target LCP <= 2.5s, INP <= 200ms, CLS <= 0.1 at field p75, and enforce a performance budget in CI.
Cross-platform token adaptation
Share one semantic token source across platforms, then render values in each platform's native units, type scale, and idioms.
Dashboard service is display-only
The dashboard service is a generic API and UI layer. It has no knowledge of git, files, or roadmap structure. Agents ...
Data Display
Choose the right pattern for the content type and user task.
Design token distribution
Generate per-platform token artifacts from one source via a build step; never hand-edit the generated outputs.
Design-Time Data
- Use `d:DataContext` and `d:DesignInstance` for XAML designer preview data
Feedback Patterns
Every user action should have visible feedback. The weight of the feedback should match
Fluent Design
Use built-in WinUI 3 controls — they implement Fluent 2 natively. Never custom-draw what a standard control can do.
Form Design
Forms are where users do real work. Reduce friction at every step.
High DPI / Display Scaling
XAML layout uses effective pixels (epx) — scaling is automatic for all XAML-rendered content.
Iconography
Icons supplement text — they do not replace it (except for universally understood symbols
Jetpack Compose performance and stability
Minimize Compose recomposition with stable types, deferred state reads, lazy-list keys, and release-build measurement.
Jetpack Compose side effects
Run side effects through the correct keyed Compose effect API, never directly inside composition.
Jetpack Compose: state hoisting and unidirectional data flow
Hoist UI state to its lowest common owner or the ViewModel, keep composables stateless, and enforce state-down/events-up unidirectional flow.
Layout
Design for the content, not a fixed screen size. Layouts should adapt gracefully from
Material 3 theming on Android
Theme Compose UIs with Material 3 color roles, ColorScheme, type and shape scales, and full dark support.
Modern CSS layout and Baseline-driven adoption
Adopt modern interoperable CSS features (container queries, @layer, :has(), subgrid, nesting, view transitions) gated on Baseline status with fallbacks.
Platform Design Languages
Defer to these canonical sources before applying the defaults in this file:
Previews
All UI components MUST include preview declarations for rapid visual verification during development. Previews should...
Progressive Web App installability
Ship a Web App Manifest plus a service worker with an explicit caching strategy, and account for iOS install/push/storage limits.
Spacing
Use a consistent spatial scale based on a **4px base unit** (8px primary grid). All spacing,
State Design
Every view that loads data or can be empty must handle all four states explicitly. Never
Theming
WinUI 3 supports tri-state theming: Light, Dark, and High Contrast.
Theming with tokens
Implement themes as alternate value sets for the same semantic tokens; swap the active set, never the component code.
Touch & Click Targets
Interactive elements MUST be large enough to tap or click accurately. Defer to the platform
Typography
Use the platform's system font. Establish a type scale with clear roles — don't invent
Visual Hierarchy
Establish clear importance through size, weight, color, and spacing. Every screen should
Windows 11 materials (Mica and Acrylic)
Apply Mica as the backdrop of long-lived windows and Acrylic for transient surfaces, honoring user theme and system settings.