design-system
Semantic design tokens, component contract specifications, Storybook documentation, responsive typography scales, and a11y tokens
- License 许可
- MIT
- 所属仓库
- poppyTM/oride
- 最近更新
- 2026-09-30
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- design-system
- description
- Semantic design tokens, component contract specifications, Storybook documentation, responsive typography scales, and a11y tokens
02 资源文件 6
- 参考文档checks/design-system-checklist.md528 B
- 参考文档examples/design_token_spec.json1.1 KB
- 参考文档manifest.json3.6 KB
- 参考文档references/color-theory.md1.5 KB
- 脚本scripts/extract_design_tokens.js1.5 KB
- 参考文档templates/wireframe-spec.md398 B
03 SKILL.md 正文
Design System Architecture & Tokens
1. Semantic Design Tokens
Structure design tokens in three tiers: Global (raw values: blue-500: #3b82f6), Semantic (intent-based: color-primary: var(--blue-500)), and Component-scoped (button-bg: var(--color-primary)).
2. Format-Agnostic Token Distribution
Maintain tokens in JSON format and compile them to platform targets: CSS custom properties, SCSS variables, JavaScript/TypeScript objects, and iOS/Android tokens via Style Dictionary.
3. Component API Contract Specification
Define strict props, slots, and events for every design system component. Enforce variant constraints via TypeScript union types (e.g. variant: 'primary' | 'secondary' | 'ghost').
4. Accessibility (A11y) Token Integration
Ensure color tokens strictly satisfy WCAG 2.2 AA contrast ratios (4.5:1 for normal text, 3:1 for large text). Provide high-contrast and reduced-motion token overrides.
5. Spacing & Fluid Typography Scales
Use a 4px or 8px baseline grid system for all margin, padding, and layout dimensions. Implement fluid typography using clamp() to scale text smoothly across viewports.
6. Component Composition & Headless Architecture
Separate component logic/state from styling. Build on accessible headless primitives (Radix UI, Headless UI, React Aria) to guarantee robust keyboard navigation and ARIA patterns.
7. Living Documentation & Storybook Catalog
Document every component in Storybook with interactive states (default, hover, active, focus, disabled, error). Document component usage guidelines and anti-patterns.
8. Visual Regression Testing Gates
Automate visual regression tests on Storybook stories in CI (using Chromatic or Playwright) to catch unintended styling regressions before merging.
9. Semantic Versioning & Deprecation Lifecycle
Follow strict semver for design system releases. Provide codemods and migration guides whenever component API signatures change or deprecations occur.
10. Theme Switching & Dark Mode Support
Implement dark mode and custom white-label themes via CSS class or data-theme attributes, switching semantic token variables with zero page refresh.
04 同仓库更多 Skills
zoom-reflow
暂无简介
wireframe-styleguide
暂无简介
visual-regression
Pixel-by-pixel snapshot testing, Playwright integration, dynamic content masking, deterministic font rendering, and cross-browser CI gates
ui-implementation
Component-driven UI implementation, multi-state matrix (default, hover, focus-visible, active, disabled, loading, empty, error), DTCG design tokens, responsive layout contracts, and accessibility tree mapping.
tui-editor-engine
Text buffer and editing semantics for a terminal code editor — index conversion, transaction-first editing, multi-cursor invariants, undo grouping, and large-file behaviour.
tree-sitter-context-indexing
暂无简介