---
name: modern-ui-design
description: >-
  Use when designing or building a modern React + Vite + Tailwind v4 frontend for a Rust desktop (Tauri v2) or web application. Provides a brand-neutral Dark-First + Light Mode token system, hairline glass surface hierarchy, crisp typography, accessible motion, and Rust ts-rs contract integration.
title: modern-ui-design
canonical_url: https://skilld.dev/gh/kj-aiml/rust-product-skills/modern-ui-design
last_updated: 2026-11-21T19:15:25.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/component-patterns.md](https://skilld.dev/api/skills-raw/kj-aiml/rust-product-skills/modern-ui-design/references/component-patterns.md), [references/design-tokens.md](https://skilld.dev/api/skills-raw/kj-aiml/rust-product-skills/modern-ui-design/references/design-tokens.md).
>
> If the user asked to install this Skill, run `npx skilld install kj-aiml/rust-product-skills/modern-ui-design`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/modern-ui-design`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/kj-aiml/rust-product-skills/modern-ui-design) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/modern-ui-design`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/modern-ui-design --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/modern-ui-design --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Modern UI Design System (Brand-Neutral Base)

## Overview

A clean, modern interface earns trust through restraint: crisp contrast, clear visual hierarchy, predictable interactive states, and zero visual clutter. This skill defines a **brand-neutral** design foundation—adapt the accent palette and emblem to each product's own identity rather than locking in any fixed brand.

Read the detailed references before styling components:
- **Color, Surface & Typography Tokens (Dark + Light):** [references/design-tokens.md](https://skilld.dev/api/skills-raw/kj-aiml/rust-product-skills/modern-ui-design/references/design-tokens.md)
- **Layout, Component States & Verification Checklist:** [references/component-patterns.md](https://skilld.dev/api/skills-raw/kj-aiml/rust-product-skills/modern-ui-design/references/component-patterns.md)

## Visual Philosophy

1. **Dark-First, Dual-Theme Ready:** Default to a deep, neutral obsidian canvas (`#0F0F0F` / `oklch` neutral dark) rather than muddy navy-grey, with a first-class crisp Light Mode token set (`#FAFAFB` canvas, `#FFFFFF` elevated cards) toggled cleanly via `.dark` / `prefers-color-scheme`.
2. **Surface Hierarchy via Hairlines & Luminance:** Separate layers with `1px` low-opacity hairline borders (`rgba(255,255,255,0.08)` in dark; `rgba(15,15,18,0.08)` in light) and subtle top inner highlights (`inset 0 1px 0`)—not heavy drop shadows or cluttered card borders.
3. **Restrained Glass & Ambient Accents:** Use `backdrop-filter: blur(...)` selectively on floating command docks, status pills, and modals so typography always stays crisp. If adding an ambient background texture (subtle radial glow or low-opacity dot-matrix wave), anchor it away from primary text and react calmly to active state.
4. **Crisp Typography & Tabular Figures:**
   - Pair a geometric sans (`Geist` / `Inter` / `Outfit`) for UI headings and body with a sharp monospace (`IBM Plex Mono` / `JetBrains Mono`) using `tabular-nums` for IPs, IDs, ports, latencies, quotas, and timestamps.
   - Tighten display headings (`tracking-tight`), keep body text readable (`leading-relaxed`), and reserve uppercase micro-labels (`text-[11px] tracking-[0.18em]`) strictly for section kickers.
5. **Motion with Restraint:** Prefer crisp `150ms` hover/press feedback and meaningful progress indicators (multi-stage phase steppers) over decorative bounce animations. Always honor `@media (prefers-reduced-motion: reduce)`.

## Architecture & Rust Contract Rules

- **Stack:** React 19 + TypeScript (`strict: true`) + Vite + Tailwind CSS v4 (`@tailwindcss/vite`) + accessible primitives (`radix-ui`) + `lucide-react` icons.
- **Single Source of Truth (`ts-rs`):** Never hand-duplicate backend structs in TypeScript. Import generated types directly from `src/generated/` produced by `cargo run -p xtask -- codegen`.
- **Thin Bridge + Preview Fallback:** Abstract backend communication behind a tiny `Bridge` interface (`createTauriBridge` / `createHttpBridge` + `createPreviewBridge`). When opened in a standard browser without the native shell or backend, render an explicit **Preview Mode** banner with scenario links (`ready`, `empty`, `missing-dep`, `blocked`, `error`) so every visual state can be verified cleanly.
- **Safety UX Matches Engine Rules:** Destructive actions require an explicit confirmation dialog; blocked states explain *which* rule blocked them and why—never silently swallow clicks.

## Visual Verification Gate

Before marking any UI task done:
1. Run `tsc --noEmit` and `vite build` with zero errors.
2. Inspect the live rendered app in a browser (desktop width ~`1280x900` AND narrow/compact width ~`768px`) checking:
   - Zero console errors or uncaught promise rejections
   - No wrapping collisions on long values (e.g., IPv6 addresses, long file paths, long titles)
   - Clear contrast on active, disabled, warning, and blocked states
   - Interactive state transitions (loading stepper, copy feedback, modal confirm, empty/error states)
