Skip to main content
Design/ux-system

UX System

You need to build or audit a design system from tokens through components to accessibility.

This is a skillset -- it chains /style-guide -> /component-spec -> /interaction-pattern-library -> /accessibility-audit in sequence. Each skill also works independently.

Use this when establishing a new design system, auditing an existing one, or standardizing design patterns across a product. Takes you from foundational tokens through component specs and interaction patterns to accessibility compliance.


The chain

StepSkillWhat it produces
1/style-guideColor palette, typography scale, spacing system, and component patterns
2/component-specComponent specifications with variants, states, behavior, and accessibility rules
3/interaction-pattern-libraryPattern catalog covering loading, state transitions, feedback, and microinteractions
4/accessibility-auditWCAG 2.2 conformance report with remediation priorities

How skills chain

  • /style-guide establishes the foundational design tokens -> colors, type, and spacing become the building blocks for components
  • /component-spec documents each component with variants, states, and behavior -> specs reference the style guide tokens
  • /interaction-pattern-library standardizes how things move and respond -> patterns reference both the style guide and component specs
  • /accessibility-audit validates the entire system against WCAG 2.2 -> findings feed back into component specs and pattern updates

What the designer does between stages

After...Designer decision
/style-guideGet stakeholder approval on design tokens. Finalize brand decisions.
/component-specReview with engineering lead. Confirm feasibility.
/interaction-pattern-libraryValidate patterns with the team. Document exceptions.
/accessibility-auditPrioritize remediation. Create stories for critical findings.

Related skills: For validating shipped UX, see /ux-validate skillset. For competitive UX comparison, see /ux-benchmark.

Example Output

Input

  • Company: Meridian Health — a mid-size telehealth platform serving 400K+ patients
  • Context: Redesigning the patient-facing web app and clinician dashboard; two separate teams using inconsistent Figma libraries and no shared token system
  • Brand inputs: Primary brand color #1A6FBF (Meridian Blue), secondary #27AE72 (Vitality Green), neutral grays; Inter typeface; "trustworthy, calm, clinical but approachable"
  • Existing system state: ~60 components in Figma with no documented specs, no accessibility audit ever performed, and three conflicting button styles across products
  • Compliance requirement: WCAG 2.2 AA minimum; HIPAA-adjacent UX considerations (clear session states, data sensitivity indicators)

Output (abbreviated)

Meridian Health — UX System Report

Scope: Patient Web App + Clinician Dashboard Chain: /style-guide/component-spec/interaction-pattern-library/accessibility-audit


Step 1 — /style-guide

Color Tokens

TokenValueUsageAA on White
color.primary.500#1A6FBFCTAs, links, focus rings✅ 5.2:1
color.primary.700#0F4A82Hover states, headings✅ 9.1:1
color.secondary.500#27AE72Success states, vitals normal✅ 4.6:1
color.secondary.700#1A7A50Secondary hover✅ 7.8:1
color.alert.danger#C0392BCritical alerts, errors✅ 5.9:1
color.alert.warning#E67E22Caution states⚠️ 3.1:1 (text use restricted)
color.neutral.100#F5F7FAPage backgrounds
color.neutral.800#2C3E50Body text✅ 11.4:1

⚠️ Designer decision required: color.alert.warning fails AA for small text. Recommend pairing with iconography and restricting to 18px+ or bold weight only. Stakeholder approval needed before finalizing alert palette.


Typography Scale

TokenSize / WeightLine HeightUsage
type.heading.xl32px / 7001.25Page titles
type.heading.lg24px / 6001.3Section headers
type.heading.md20px / 6001.35Card titles, modal headers
type.body.md16px / 4001.6Primary body copy
type.body.sm14px / 4001.5Secondary labels, metadata
type.label.caps11px / 600 / uppercase1.4Form labels, data table headers
type.clinical.mono14px / 400 / monospace1.5Dosage values, IDs, timestamps

Clinical mono token addresses HIPAA-adjacent readability for sensitive numeric data (MRNs, dosages, lab values).


Spacing System

Base unit: 4px

space.1 = 4px · space.2 = 8px · space.3 = 12px · space.4 = 16px · space.6 = 24px · space.8 = 32px · space.12 = 48px · space.16 = 64px


Step 2 — /component-spec

Component: Button

Variants: Primary · Secondary · Ghost · Danger · Link Sizes: Large (48px height) · Default (40px) · Small (32px)

StatePrimaryDanger
Defaultprimary.500 bg / white textalert.danger bg / white text
Hoverprimary.700 bgdarken 10%
Focus3px ring primary.300 / 2px offset3px ring alert.danger / 2px offset
Disabledneutral.300 bg / neutral.500 text / cursor: not-allowedsame
LoadingSpinner replaces label + aria-busy="true"same

Accessibility rules:

  • Minimum touch target 44×44px (applies to all sizes via padding compensation)
  • aria-label required when button contains icon only
  • Danger buttons require confirmation pattern before destructive action (see Interaction Pattern Library)
  • Never disable submit buttons — use inline validation instead (prevents confusion for screen reader users)

Component: Alert / Notification Banner

Variants: Info · Success · Warning · Critical Behavior: Inline (persists) · Toast (auto-dismiss at 5s, pausable on hover) · Session (full-width, dismissible)

VariantIconBorder-leftRoleLive Region
Infoinfo-circleprimary.500notearia-live="polite"
Successcheck-circlesecondary.500aria-live="polite"
Warningtriangle-exclamationalert.warningaria-live="polite"
Criticalx-circlealert.dangeralertaria-live="assertive"

Critical alerts use role="alert" + aria-live="assertive". Clinician dashboard critical lab value alerts must never auto-dismiss.


Component: Data Table (Clinician Dashboard)

Variants: Standard · Sortable · Expandable row · Selectable States: Loading skeleton · Empty · Error · Paginated

Key specs:

  • Row height: 48px minimum (touch/click target compliance)
  • Sticky header on scroll exceeding 400px table height
  • Sort indicators: up/down chevron + aria-sort="ascending|descending|none"
  • Sensitive data cells (labs, medications) use type.clinical.mono token
  • Row selection uses role="checkbox" + visible focus ring

Step 3 — /interaction-pattern-library

Pattern: Loading States

ContextPatternDuration triggerImplementation
Page navigationFull-page skeletonImmediateSkeleton screens matching content layout
Data table refreshInline skeleton rowsImmediatePreserve column structure
Button actionSpinner-in-button>300msaria-busy, label changes to "Saving…"
Background syncSubtle progress bar (top of viewport)Immediate2px, primary.300, non-blocking

Rule: Never use full-page spinners for partial updates. Patients and clinicians must retain context during data loads.


Pattern: Form Validation

  • Inline validation: Trigger on blur (not on keystroke) for standard fields
  • Clinical fields (dosage, DOB, MRN): Validate on blur AND on submit; display both inline + summary
  • Error messages: placed below field, role="alert", linked via aria-describedby
  • Success confirmation: only show for high-stakes completions (appointment booking, prescription submission)

Pattern: Session Timeout (HIPAA-adjacent)

  1. At 13 minutes of inactivity → modal warning: "Your session will expire in 2 minutes"
  2. Modal traps focus, primary CTA "Stay Logged In," secondary "Log Out Now"
  3. At 15 minutes → auto-logout, redirect to login with toast: "Session expired for your security"
  4. All unsaved form data → warn via beforeunload prompt before timeout clears state

Pattern: Destructive Action Confirmation

Applies to: appointment cancellation, record deletion, removing a care team member

  1. Trigger button (Danger variant) → opens confirmation modal