Chuyển đến nội dung
Skillpedia
Giao diện (UI/UX)48k · #6268

design-system

Skill này làm gì

Công cụ này giúp đảm bảo các yếu tố hình ảnh của website như màu sắc, kiểu chữ và hiệu ứng được triển khai nhất quán và hiệu quả. Nó đặt ra các quy tắc để mọi thứ trông và hoạt động giống nhau trên toàn bộ trang.

Khi nào nên dùng

  • ✓Khi bạn xây dựng một website hoặc ứng dụng mới.
  • ✓Khi bạn thêm các tính năng hình ảnh mới vào một website hiện có.
  • ✓Khi bạn muốn đảm bảo website có diện mạo và cảm giác nhất quán.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/design-system/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/design-system/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm thế nào để tôi đảm bảo màu sắc và phông chữ nhất quán trên toàn bộ website?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ hoạt động bằng cách định nghĩa các “token” (khối mã nhỏ) cho màu sắc, kiểu chữ và hiệu ứng. Thay vì dùng các giá trị ngẫu nhiên, mã dùng các token đã định sẵn, đảm bảo tính đồng nhất.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Design system

When to Use

Use this skill when you need mechanical implementation invariants for frontend design: token architecture, typography hierarchy, loading order, FOUT prevention, chrome stability, motion timing, color semantics. Use with design when building components, pages, or design systems. (Aesthetic direction lives in...

Apply with design when implementing UI: components, pages, or design systems. Every color, type, and motion choice should trace back to these rules.

Token architecture

All colors map to a small set of primitives. No random hex values.

  • Foreground: Text hierarchy (primary, secondary, muted).
  • Background: Surface elevation (base, raised, overlay).
  • Border: Separation hierarchy (subtle, default, emphasis).
  • Brand: Identity and primary accent.
  • Semantic: Destructive, warning, success (and optional info).

Use tokens in code (CSS variables, theme objects); never hardcode hex for UI.

Typography

  • Hierarchy: Headlines — heavier weight, tighter letter-spacing for presence. Body — comfortable weight for readability. Labels/UI — medium weight, works at smaller sizes. Data — monospace, tabular-nums for alignment.
  • Combine size, weight, and letter-spacing so hierarchy is clear at a glance. If you squint and can't tell headline from body, hierarchy is too weak.
  • Fonts: pair a display font with a body font; keep hierarchy legible at a glance. Which fonts is direction, not mechanics — pick from the domain and push off your first/default instinct (the mean); see design-spatial §2.
  • Data (functional only): real aligned numbers, IDs, timestamps in monospace with tabular-nums — mono earns its place when values line up in a column. Do NOT sprinkle mono on decorative eyebrow/metadata microtext ("35MM · DEVELOP · SCAN", fake spec captions) for a "technical" look — that's the current trend-slop, not data. See design-spatial §2.

Loading order — first seen, first loaded

The first viewport must paint complete and correct, fast. Order every resource by whether the user sees it first; the rest waits.

  • Prioritize only the above-the-fold set (hero text, hero image/video, brand mark). Preloading everything is the same as preloading nothing — the true criticals lose the bandwidth race. Pick the few things in the first screenful and prioritize those.
  • Fonts: self-host WOFF2. Convert OTF/TTF → WOFF2 (Brotli; ~half the bytes, identical glyphs) and <link rel="preload" as="font" type="font/woff2" crossorigin> the weights used in the first viewport. Never a render-blocking third-party font stylesheet — a Google Fonts <link> adds a CSS round-trip plus extra DNS/TLS before the font even starts downloading; self-host instead.
  • LCP image/video: fetchpriority="high" on the hero image (or the video poster); <link rel="preload" as="image"> it when it's CSS-referenced (the parser can't see CSS url()s early). The hero box must never be empty — ship a poster/low-res placeholder so there's no blank frame.
  • Below the fold: loading="lazy" decoding="async" on images; preload="none" (or "metadata") on video; defer non-critical JS. Always reserve space (aspect-ratio, or width+height) so deferred media can't shift layout (CLS).
  • Keep the render-blocking head minimal: inline critical CSS, defer the rest.

Never let fonts pop in (no FOUT) — ever

font-display: swap is the pop — it paints a fallback face, then swaps to the webfont and reflows. Do not use it for any text the user watches load (titles, wordmarks, hero copy). The rule is absolute: title/display text must never flash a fallback or reflow.

  • Gate visibility on the real font. Synchronously in <head>, add a fonts-pending class to <html> that holds the display-font text at opacity: 0. On document.fonts.ready — kick it with document.fonts.load('<weight> 1em "Family"') for each critical face — swap to fonts-ready and fade the text in (0.5s). Always include a safety timeout (2.5s) that reveals regardless, so a font failure can never leave text permanently hidden.
  • Pair this with preload + WOFF2 (above) so the hidden window is a few hundred ms, not seconds — the fade reads as intentional, not as a stall.

…

Câu hỏi thường gặp

“Token” là gì?

Token giống như tên hoặc nhãn cho các giá trị cụ thể, như một màu chính xác hoặc cỡ chữ. Dùng token thay vì giá trị trực tiếp đảm bảo mọi người dùng cùng một yếu tố hình ảnh.

Tại sao việc tải phông chữ đúng cách lại quan trọng?

Tải phông chữ đúng cách ngăn văn bản bị “nhảy” hoặc thay đổi diện mạo khi trang đang tải, mang lại trải nghiệm mượt mà hơn cho người dùng.

Điều này ảnh hưởng thế nào đến tốc độ website?

Bằng cách tối ưu việc tải hình ảnh và phông chữ, và dùng các quy tắc nhất quán, website có thể tải nhanh hơn và trông chuyên nghiệp hơn.

Chi tiết

Mô tả gốc của tác giả

Mechanical implementation invariants for frontend design: token architecture, typography hierarchy, loading order, FOUT prevention, chrome stability, motion timing, color semantics. Use with design when building components, pages, or design systems.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#6268
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự