Skip to content

设计系统草案(内部) ​

本文是尚未完全映射模板运行时 tokens 的设计输入,仅供维护者评审。它不是组件公共 API,也不覆盖模板现有样式实现。


Project: Kevairy Admin Template Generated: 2026-08-14 15:37:52 Category: Admin Dashboard Design Dials: Variance 4/10 (Balanced / Modern) | Motion 3/10 (Subtle) | Density 8/10 (Dense / Dashboard)


Global Rules ​

Color Palette ​

RoleHexCSS Variable
Primary#1E40AF--color-primary
On Primary#FFFFFF--color-on-primary
Secondary#3B82F6--color-secondary
Accent/CTA#D97706--color-accent
Background#F8FAFC--color-background
Foreground#1E3A8A--color-foreground
Muted#E9EEF6--color-muted
Border#DBEAFE--color-border
Destructive#DC2626--color-destructive
Ring#1E40AF--color-ring

Color Notes: Blue data + amber highlights [Accent adjusted from #F59E0B for WCAG 3:1]

Typography ​

  • Heading Font: Fira Code
  • Body Font: Fira Sans
  • Mood: dashboard, data, analytics, code, technical, precise
  • Google Fonts: Fira Code + Fira Sans

CSS Import:

css
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');

Spacing Variables ​

Density: 8/10 — Dense / Dashboard

TokenValueUsage
--space-xs2px / 0.125remTight gaps
--space-sm4px / 0.25remIcon gaps, inline spacing
--space-md8px / 0.5remStandard padding
--space-lg12px / 0.75remSection padding
--space-xl16px / 1remLarge gaps
--space-2xl24px / 1.5remSection margins
--space-3xl32px / 2remHero padding

Shadow Depths ​

LevelValueUsage
--shadow-sm0 1px 2px rgba(0,0,0,0.05)Subtle lift
--shadow-md0 4px 6px rgba(0,0,0,0.1)Cards, buttons
--shadow-lg0 10px 15px rgba(0,0,0,0.1)Modals, dropdowns
--shadow-xl0 20px 25px rgba(0,0,0,0.15)Hero images, featured cards

Component Specs ​

Buttons ​

css
/* Primary Button */
.btn-primary {
  background: #d97706;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 200ms ease;
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Secondary Button */
.btn-secondary {
  background: transparent;
  color: #1e40af;
  border: 2px solid #1e40af;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 200ms ease;
  cursor: pointer;
}

Cards ​

css
.card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all 200ms ease;
  cursor: pointer;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

Inputs ​

css
.input {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 200ms ease;
}

.input:focus {
  border-color: #1e40af;
  outline: none;
  box-shadow: 0 0 0 3px #1e40af20;
}

Modals ​

css
.modal-overlay {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 90%;
}

Style Guidelines ​

Style: Data-Dense Dashboard

Keywords: Multiple charts/widgets, data tables, KPI cards, minimal padding, grid layout, space-efficient, maximum data visibility

Best For: Business intelligence dashboards, financial analytics, enterprise reporting, operational dashboards, data warehousing

Key Effects: Hover tooltips, chart zoom on click, row highlighting on hover, smooth filter animations, data loading spinners

Page Pattern ​

Pattern Name: Real-Time / Operations Landing

  • Conversion Strategy: For ops/security/iot products. Demo or sandbox link. Trust signals.
  • CTA Placement: Primary CTA in nav + After metrics
  • Section Order: 1. Hero (product + live preview or status), 2. Key metrics/indicators, 3. How it works, 4. CTA (Start trial / Contact)

Motion ​

Page Transition (Subtle) — Trigger: route change | Duration: 200-300ms | Easing: power1.inOut

js
gsap.to(main, {
  opacity: 0,
  duration: 0.2,
  onComplete: () => {
    navigate()
    gsap.fromTo(main, { opacity: 0 }, { opacity: 1, duration: 0.2 })
  }
})

Framework notes: Pair with the router's transition hooks (Next.js App Router transitions, React Router's useNavigate, Vue Router's beforeEach/afterEach)

  • ✅ Preload the destination route's critical assets before the exit tween finishes
  • ❌ Don't block navigation on animation; cap exit duration at ~250ms so the app never feels unresponsive
  • ⚡ Exit animation should always resolve faster than entrance (asymmetric timing) so back/forward feels snappy

Anti-Patterns (Do NOT Use) ​

  • ❌ Ornate design
  • ❌ No filtering

Additional Forbidden Patterns ​

  • ❌ Emojis as icons — Use SVG icons (Heroicons, Lucide, Simple Icons)
  • ❌ Missing cursor:pointer — All clickable elements must have cursor:pointer
  • ❌ Layout-shifting hovers — Avoid scale transforms that shift layout
  • ❌ Low contrast text — Maintain 4.5:1 minimum contrast ratio
  • ❌ Instant state changes — Always use transitions (150-300ms)
  • ❌ Invisible focus states — Focus states must be visible for a11y

Pre-Delivery Checklist ​

Before delivering any UI code, verify: