Skip to content

Instantly share code, notes, and snippets.

@angelxmoreno
Last active April 19, 2026 04:17
Show Gist options
  • Select an option

  • Save angelxmoreno/9e580cfd6f3f59f76ec635fa2c6ef09b to your computer and use it in GitHub Desktop.

Select an option

Save angelxmoreno/9e580cfd6f3f59f76ec635fa2c6ef09b to your computer and use it in GitHub Desktop.
Personal notes on desktop-style UX patterns in web applications, including routing, layout, motion, and component strategy.

Desktop UX Standards Inside a Web Tech Stack

Overview

Modern applications are increasingly built with web technologies but are expected to behave like professional desktop tools. This document defines the principles, patterns, and behavioral rules that make a web-based application feel desktop-class instead of page-centric.


Core Philosophy

Build for long-lived, high-efficiency workflows rather than short, task-based interactions.

Desktop UX prioritizes:

  • Speed
  • Density
  • Persistence
  • Spatial awareness
  • Recoverability
  • Keyboard fluency

Web UX typically prioritizes:

  • Simplicity
  • Accessibility
  • Linear navigation
  • Short sessions

Key Differences: Desktop vs Web

1. Information Density

  • Desktop: High-density layouts, multiple visible surfaces, 4px/8px spacing rhythms.
  • Web: Lower-density layouts with more whitespace and stronger vertical flow.

2. Navigation Model

  • Desktop: Spatial navigation through panels, tabs, inspectors, and workspaces.
  • Web: Hierarchical navigation through pages and routes.

3. Session Model

  • Desktop: Long-lived sessions with durable state and remembered layout.
  • Web: Shorter sessions with more frequent resets.

4. Interaction Model

  • Desktop: Keyboard-first, right-click aware, repeat-action optimized.
  • Web: Click-first, beginner-oriented, lighter contextual behavior.

Core Desktop UX Patterns

1. Multi-Pane Layouts

Use persistent workspace regions instead of page replacement:

  • Sidebar
  • Main content panel
  • Secondary panel or inspector

Goal: Keep context visible and reduce navigation churn.

2. Persistent UI State

Desktop apps should remember:

  • Open tabs
  • Scroll positions
  • Filters and sorting
  • Selected items
  • Panel widths
  • Collapsed sections
  • Inspector visibility

Persist these locally by default so the app feels instant-on.

3. Resizable, Collapsible, and Persisted Layouts

Panels are tools, not fixed web columns.

  • Primary panes should be resizable when that improves workflow.
  • Collapsed and expanded states should persist across sessions.
  • Define minimum and maximum widths so resizing does not break readability or trap content.

4. Panel-Based Scrolling, Not Viewport Scrolling

Desktop-style applications should avoid document-level scrolling for core workflows.

  • Each panel scrolls independently.
  • The viewport itself remains fixed.
  • Keep body at overflow: hidden and use overflow: auto per panel.

This preserves orientation and allows multiple datasets to remain visible and usable at once.

5. Animations as Feedback, Not Decoration

Animations should communicate state changes and spatial relationships.

Use them for:

  • Panel transitions
  • Resizing and docking changes
  • List insert/remove/reorder
  • Hover and focus states
  • Loading and completion feedback

Timing: 150–250ms for most transitions.

6. Motion Accessibility

Motion should support clarity without becoming a tax on comfort.

  • Respect prefers-reduced-motion.
  • Provide reduced-motion variants for inspectors, panel transitions, and list animations.
  • Keep timing and easing consistent across the application.

7. Keyboard-Driven UX and Focus Management

Desktop apps assume users will learn shortcuts.

Common patterns:

  • Command palette: Cmd/Ctrl + K
  • Quick open: Cmd/Ctrl + P
  • Esc stack: dismiss the most transient layer first
  • Strong, visible :focus-visible treatment on every interactive control

Users should be able to navigate the full application without a mouse.

8. Tabs and Workspaces

Prefer:

  • Tabs
  • Split views
  • Workspace shells

These support parallel workflows without destroying context.

9. Selection as a First-Class State

Selection should not be treated as a side effect of navigation.

  • Selection and “open details” should be distinct states.
  • A row may be selected without changing routes or replacing layout.
  • Support standard desktop selection rules where relevant:
    • Shift for range selection
    • Cmd/Ctrl for additive or toggle selection
  • Bulk actions should live in a stable command surface, not only in per-row controls.

10. High-Frequency Action Optimization

Desktop UX assumes repeated actions:

  • Fast filtering
  • Inline editing
  • Bulk operations
  • Rapid selection changes

Design should reduce:

  • Clicks
  • Route changes
  • Context switching

11. Context-Aware Interactions (Right-Click)

The context menu is a first-class action surface in desktop software.

  • Every primary entity should provide a context menu.
  • Context menus should mirror frequent inline actions.
  • Prefer native OS context menus where appropriate in desktop shells like Tauri.

12. Command Surface Hierarchy

Actions should have a predictable home based on scope and frequency.

Use a consistent hierarchy:

  • Command bar or toolbar for global and section-level actions
  • Inline actions for the highest-frequency local actions
  • Context menu for expert shortcuts
  • Inspector for detailed state and secondary actions

Do not hide critical actions behind hover alone.

13. Local-First and Optimistic UI

Professional tools should feel immediate.

  • Update UI state immediately when the user acts.
  • Synchronize in the background.
  • Roll back gracefully on failure.
  • Restore the last-known useful state before fresh data completes loading.

14. Background Tasks and Status Surfaces

Long-running work should remain inspectable without blocking the workspace.

  • Use a persistent status region for tasks such as sync, pull, import, reconnect, or indexing.
  • Toasts may acknowledge events, but they should not be the only place progress or failure is visible.
  • Users must be able to inspect task state after transient notifications disappear.

15. Non-Blocking Detail Views (Inspectors)

Avoid blocking centered modals for inspection-heavy workflows.

  • Prefer right-side inspectors or split views for details and logs.
  • Keep the main list or workspace visible and interactive.
  • If a view needs heavy interaction or covers most of the screen, it likely deserves a dedicated workspace instead of a modal.

16. Undo, Confirmation, and Recovery

Desktop tools optimize for confidence as well as speed.

  • Prefer undo or rollback over hard confirmations when possible.
  • Reserve blocking confirmations for irreversible actions.
  • Error handling should explain what happened, what state was preserved, and what the user can retry.

17. Empty, Loading, and Error States

Operational states belong inside the workspace, not in separate “screens.”

  • Render empty, loading, and error states inline within the affected panel.
  • Preserve surrounding layout so the application remains spatially stable.
  • Provide next actions when possible:
    • Retry
    • Reconnect
    • View details
    • Open logs

Anti-Patterns

Avoid these when building desktop-style apps:

  • Full-page route changes for core workflows
  • Global page scrolling on the body
  • Large empty whitespace layouts
  • Modal overuse where inspectors would be better
  • Losing state when navigating
  • Losing selection when switching panels
  • Critical actions available only on hover
  • Toast-only handling for long-running work
  • Elements teleporting into place without transition or spatial logic

Routing in Desktop-Style Web Apps

Routers are still useful. The problem is letting routing define the UX.

Do not let the router become your UX model.

Use the router for macro-navigation. Use application state or search params for micro-navigation.

Macro-Navigation (Routes)

Appropriate route boundaries:

  • Home
  • Library
  • Projects
  • Settings
  • Admin
  • Workspace

Micro-Navigation (State / Search Params)

Prefer state or search params for:

  • Selected item
  • Active tab
  • Expanded inspector
  • Open side panel
  • Sort mode
  • Filters
  • Panel widths
  • Split-view visibility

Search params are often preferable to local-only state for professional tools because they support bookmarks, sharable views, and useful back-button behavior.

Good Router Use Cases

Routers remain excellent for:

  • Deep linking
  • Shareable URLs
  • History support
  • Restoring workspace entry points
  • Route-based code splitting
  • Top-level application sections

Rule of Thumb

Ask:

Is this a new place in the app, or just a new state of the current workspace?

  • If it is a new place, use routing.
  • If it is a new state, prefer application state.

Recommended Routing System

For desktop-style applications inside a web stack, TanStack Router is a strong default because it offers explicit routing control without forcing a page-first UX model.


Implementation Guidelines

Layout

  • Use CSS grid or flexbox for fixed regions
  • Avoid document-flow layouts for core workspace UI
  • Keep overflow: hidden at the viewport level and overflow: auto on panels

Density Audit

  • Reduce padding and margin from web-default values to tighter 4px/8px increments where usability allows
  • Prioritize information density and horizontal workflow surfaces over long scrolling pages

State

  • Centralize client state where cross-panel coordination matters
  • Persist critical UI state
  • Treat selection, inspector state, and task state as first-class concerns

Routing

  • Minimize route churn
  • Prefer state-driven workspace updates

Performance

  • Use virtualized lists for large datasets
  • Optimize render paths for frequently updated surfaces
  • Keep background work non-blocking

Motion

  • Use motion systems to preserve continuity
  • Keep transitions fast and purposeful
  • Provide reduced-motion variants

Design Language, Motion, and Component Layer

Design Language

Adopt the layout and interaction rules of Fluent-style desktop tools without copying a specific visual brand:

  • Dense panel-based layouts
  • Command surfaces
  • Persistent workspace chrome
  • Functional motion

Borrow the rules, not the look.

Motion Layer

Use a consistent animation system for:

  • Panel open/close
  • Layout transitions
  • Tabs and workspace switching
  • List updates
  • Hover and focus emphasis

Principles:

  • Preserve spatial continuity
  • Communicate state change
  • Avoid decorative animation for its own sake

Component Layer

Use a composable component system that supports:

  • unopinionated primitives
  • strong keyboard handling
  • accessible focus behavior
  • dense customization

Headless or low-opinion component primitives fit better than theme-heavy “website UI” kits.


Mental Model

You are not building pages. You are building a workspace.

Think in terms of:

  • Surfaces
  • Panels
  • Context
  • Tools
  • Selection
  • Recovery

Summary

To achieve desktop UX in a web stack:

  1. Replace pages with panels
  2. Replace page scrolling with panel scrolling
  3. Use routing for places, not every interaction
  4. Preserve layout, context, and selection
  5. Favor optimistic and recoverable workflows
  6. Make tasks and errors inspectable without blocking work
  7. Use motion and focus as functional feedback

Final Principle

If the product feels like a website, it is still missing desktop behavior. It should feel like a tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment