Beautiful gui design

From curiositech/windags-skills · View interactive version

Beautiful gui design is an AI agent skill from the GitHub repository curiositech/windags-skills. Design and build beautiful, accessible graphical interfaces — web, desktop (Electron/Tauri), and native (iOS/macOS/Android). Use for visual hierarchy and layout, color and theming (light/dark, semantic tokens, WCAG contrast), typography systems, motion and micro-interactions, accessibility, componen

How to use this skill

Skill file

Beautiful GUI Design

Treat the screen as a designed surface, not a dump of controls: hierarchy, color, type, motion, and accessibility are load-bearing, and every choice must survive light/dark mode, small and large viewports, keyboard and screen-reader use, and the conventions of the platform it ships on.

When to Use

NOT for

Decision Points

flowchart TD
  A[GUI design task] --> B{Output target?}
  B -->|Web| C{Component adapts to its container or the page?}
  C -->|Its container| C1[Container queries + fluid type]
  C -->|The page| C2[Mobile-first breakpoints]
  B -->|Desktop Electron/Tauri| D[Web tech, but adopt the host OS idioms]
  B -->|Native iOS/macOS| E[SwiftUI + SF Symbols + Apple HIG]
  B -->|Native Android| F[Compose + Material 3 + Material icons]
  C1 --> G{Need ship-fast or full control?}
  C2 --> G
  D --> G
  G -->|Ship fast| H[Styled kit: shadcn/ui on Radix]
  G -->|Full control / cross-platform looks| I[Headless primitives: Radix/Headless UI + own styling]
  H --> J[Layer the system: tokens -> components -> a11y -> motion]
  I --> J
  E --> J
  F --> J

Route first:

Visual System Rules

Failure Modes

Anti-Pattern: "Rainbow Vomit"

Symptom: Many unrelated colors; states (hover/error/focus) are indistinguishable from intent (primary/info).

Detection rule: Count unique colors in a 400×400px screenshot — more than ~8 is a smell.

Fix: One primary + one accent + semantic status colors; derive hover/active/disabled by lightness offset. references/02.

Anti-Pattern: "Invisible in Light Mode" (or Dark)

Symptom: Looks fine in one theme, unreadable in the other (light text on light, low-contrast accents).

Detection rule: Hardcoded theme colors; contrast checker reports < 4.5:1 (text) or < 3:1 (UI) in either mode.

Fix: Semantic tokens with real light AND dark values (not an inversion); verify both with a contrast tool. references/02.

Anti-Pattern: "Tiny Type / Locked Zoom"

Symptom: Body/caption text below 14px; user-scalable=no or maximum-scale<2; ignores OS text size.

Detection rule: Grep for font-size: 0.[0-7]…, Tailwind text-xs on prose, user-scalable=no.

Fix: rem-based scale, ≥14px body, honor Dynamic Type, never disable zoom. references/03, references/05.

Anti-Pattern: "Decorative Motion / Layout Thrash"

Symptom: Animations on width/height/top/left, parallax, >300ms repeated transitions; janky on mobile.

Detection rule: DevTools Performance shows tall Layout/Recalc bars during animation; no prefers-reduced-motion path.

Fix: Animate transform/opacity only; tokenize durations/easing; honor reduced-motion. references/04.

Anti-Pattern: "Web Look on Native"

Symptom: Material ripples on iOS, 4pt corners and emoji icons, centered controls that fight the HIG.

Detection rule: Side-by-side with a first-party app (Settings, Messages) — corners/spacing/icons/controls differ.

Fix: Use the platform's primitives, icon set, spacing, and type. references/06.

Anti-Pattern: "Magic Numbers in Components"

Symptom: padding: 13px, one-off hex, hand-picked hover colors scattered through component files.

Detection rule: Grep components for numeric literals and #[0-9a-f]{6} — every hit is un-tokenized.

Fix: Three-tier tokens; components reference semantic tokens only. references/06.

Anti-Pattern: "Stateless / Inaccessible Controls"

Symptom: A control with only default + click; no focus ring, no disabled/loading/error, <div>-as-button.

Detection rule: Tab through the UI — focus vanishes; render the control in all states — most are missing.

Fix: Full state machine (default/hover/active/focus/disabled/loading) on a semantic element or headless primitive. references/05, references/06.

Worked Example: A Button, Done Right

Before — hardcoded, themeless, inaccessible:

<button style={{ background: '#0066FF', color: '#fff', padding: '13px', borderRadius: 4 }}>Save</button>

Problems: raw hex (no theme), magic padding, no hover/active/focus/disabled, white text may fail contrast, no dark mode.

After — tokens + states + a11y:

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  padding: var(--space-2) var(--space-4);      /* 8pt grid */
  border-radius: var(--radius-md);
  font-size: 1rem;                              /* ≥14px */
  transition: background-color 150ms cubic-bezier(0,0,.2,1);  /* ease-out */
}
.btn-primary:hover    { background: var(--color-primary-hover); }   /* −10% L */
.btn-primary:active   { background: var(--color-primary-active); transform: scale(.98); }
.btn-primary:focus-visible { outline: 3px solid var(--color-focus-ring); outline-offset: 2px; }
.btn-primary:disabled { background: var(--color-surface-subtle); color: var(--color-text-disabled); cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .btn-primary { transition: none; } }

Why it works: a semantic <button> (keyboard + SR for free), tokens that flip cleanly for dark mode, every state defined, contrast guaranteed by token design, motion that respects the user. The same tokens render natively via SF Symbols/SwiftUI on iOS and Compose on Android (references/06).

Quality Gates

Fork Guidance

Fork when the work has distinct lanes owned by different actors:

Keep final visual-language decisions in the parent so one actor owns coherence.

Reference Map

<!-- BEGIN BUNDLE INDEX (auto: index_references.py) -->

Skill Bundle Index

Every file in this skill, and when to open it. Auto-generated; run scripts/index_references.py --fix.

references/

<!-- END BUNDLE INDEX -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.