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.

kotlin

Android navigation in Compose

Use type-safe Navigation Compose with serializable routes, single-activity architecture, and hoisted nav state.

kotlin

Android predictive back

Migrate off deprecated back handling to OnBackPressedDispatcher and support the predictive back gesture with progress-driven animations.

kotlin

Animation & Motion

Motion should be purposeful — guide attention, show spatial relationships, and provide

windows

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.

swiftiosmacos

Color

Use color with intention — never as the sole means of conveying information.

typescriptwebwindows

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.

webtypescript

Cross-platform token adaptation

Share one semantic token source across platforms, then render values in each platform's native units, type scale, and idioms.

swiftkotlintypescriptcsharpweb

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.

swiftkotlintypescriptcsharpweb

Design-Time Data

- Use `d:DataContext` and `d:DesignInstance` for XAML designer preview data

csharpwindows

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.

csharpwindows

Form Design

Forms are where users do real work. Reduce friction at every step.

web

High DPI / Display Scaling

XAML layout uses effective pixels (epx) — scaling is automatic for all XAML-rendered content.

csharpwindows

Iconography

Icons supplement text — they do not replace it (except for universally understood symbols

windows

Jetpack Compose performance and stability

Minimize Compose recomposition with stable types, deferred state reads, lazy-list keys, and release-build measurement.

kotlin

Jetpack Compose side effects

Run side effects through the correct keyed Compose effect API, never directly inside composition.

kotlin

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.

kotlin

Layout

Design for the content, not a fixed screen size. Layouts should adapt gracefully from

typescriptwebwindows

Material 3 theming on Android

Theme Compose UIs with Material 3 color roles, ColorScheme, type and shape scales, and full dark support.

kotlin

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.

web

Platform Design Languages

Defer to these canonical sources before applying the defaults in this file:

kotlinwebwindows

Previews

All UI components MUST include preview declarations for rapid visual verification during development. Previews should...

kotlinswift

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.

webtypescript

Spacing

Use a consistent spatial scale based on a **4px base unit** (8px primary grid). All spacing,

windows

State Design

Every view that loads data or can be empty must handle all four states explicitly. Never

typescriptweb

Theming

WinUI 3 supports tri-state theming: Light, Dark, and High Contrast.

csharpwindows

Theming with tokens

Implement themes as alternate value sets for the same semantic tokens; swap the active set, never the component code.

swiftkotlintypescriptcsharpweb

Touch & Click Targets

Interactive elements MUST be large enough to tap or click accurately. Defer to the platform

ioskotlintypescriptwebwindows

Typography

Use the platform's system font. Establish a type scale with clear roles — don't invent

ioskotlinmacostypescriptwebwindows

Visual Hierarchy

Establish clear importance through size, weight, color, and spacing. Every screen should

windows

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.

windowscsharp