File này hướng dẫn anh sử dụng Cowork UI Kit khi bắt đầu 1 công việc thực tế — từ "anh có idea" đến "có UI chạy trên browser". Không lý thuyết, chỉ workflow.
3 scenario phổ biến nhất + decision tree chọn aesthetic + code snippet copy-paste + checklist QC trước deploy.
_previews/index.html, nhìn 6 cái, chọn 1.tokens/tailwind.preset.js. WordPress/HTML → import tokens/tokens.css.showcase/0X-*.html, view source, copy block HTML cần dùng. Paste vào project. Xong.Trả lời câu hỏi → cây dẫn anh đến file mockup tương ứng.
Mỗi archetype đã map cứng vào 1 aesthetic — đừng pha trộn.
Landing, editorial, deck, mobile PWA — bất cứ thứ gì người dùng cuối sẽ chạm vào.
Dashboard, internal tool, BI — bất cứ thứ gì người trong team dùng để ra quyết định.
Pick scenario phù hợp + làm theo từng bước.
Vd: KHI Studio v2, KHI Drive, BetterBuy admin, AI Tools dashboard mới
# Trong 00-dev/
npx create-next-app@latest khi-studio --typescript --tailwind --app
cd khi-studio
cp ../../00-templates/ui-kit/tokens/tailwind.preset.js ./tailwind.preset.js
tailwind.config.ts
import type { Config } from "tailwindcss";
import coworkPreset from "./tailwind.preset.js";
const config: Config = {
presets: [coworkPreset],
content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"],
};
export default config;
app/layout.tsx
// Warm aesthetic dùng Instrument Serif + Inter + Plus Jakarta Sans
// Dark aesthetic dùng Inter + IBM Plex Mono
import { Inter, Instrument_Serif, IBM_Plex_Mono } from "next/font/google";
const inter = Inter({ subsets: ["latin"], variable: "--font-sans" });
const serif = Instrument_Serif({ weight: "400", subsets: ["latin"], variable: "--font-serif" });
const mono = IBM_Plex_Mono({ weight: ["400", "500"], subsets: ["latin"], variable: "--font-mono" });
Vd cần Button warm:
showcase/01-primitives.html trong browser → tìm section "Button" → view source → copy block warm// Paste vào component React của anh
<button className="bg-warm-coral hover:bg-warm-coral-deep text-white px-6 py-3 rounded-2xl shadow-md font-medium transition">
Start subscription
</button>
// Warm landing hero
<section className="bg-mesh-warm min-h-screen">...</section>
// Dark dashboard background
<div className="bg-dark-base text-dark-text min-h-screen">...</div>
/kry-qc ui — em sẽ check font ≥12px, không hardcode hex, contrast 4.5:1, tap target ≥32px.
Vd: landing microsite, presentation slide, ladning ads campaign, mockup gửi đối tác
# Vd cần landing warm
cp 00-templates/ui-kit/_previews/page-C-landing.html ./annhien/04-marketing/landing-may-2026.html
showcase/04-patterns.html tìm section "Testimonial" → copy block → paste vào file của anh.
file:// protocol → check render. Deploy: upload lên VPS hoặc host static (Cloudflare Pages, Vercel).
Vd: tramhuongannhien.vn, tweak Elementor section, custom block
// functions.php của theme
function enqueue_cowork_tokens() {
wp_enqueue_style('cowork-tokens', get_template_directory_uri() . '/cowork-tokens.css');
}
add_action('wp_enqueue_scripts', 'enqueue_cowork_tokens');
/* Custom CSS trong Elementor section */
.cta-button {
background: var(--w-coral);
color: white;
border-radius: var(--r-2xl);
padding: var(--sp-3) var(--sp-6);
box-shadow: var(--shadow-md);
}
.cta-button:hover {
background: var(--w-coral-deep);
}
.mesh-warm
/* Elementor section custom class: mesh-warm đã có trong tokens.css */
/* Section settings → Advanced → CSS Classes: mesh-warm */
Đây là rule em đã enforce qua /kry-qc ui. Tránh để bị nhắc lại.
bg-warm-coral hoặc var(--w-coral).text-[10px] hoặc text-[11px].min-h-[44px] hoặc py-3 cho button mobile.whitespace-nowrap + tách row rõ ràng.bg-warm-coral, text-dark-text-2. Đổi brand → đổi preset, không phải sửa code.showcase/04-patterns.html..tab-num (đã có trong tokens.css). Để cột số align thẳng./kry-qc ui trước push prod. Khi báo done.tokens/tokens.css + tailwind.preset.js đồng thời. Không sửa lẻ.w-base #FAF6EEw-surface #FDFAF3w-coral #C97464w-coral-deep #B5604Fw-sage #5E7355w-amber #D4A574w-ink #2D2E2Ad-base #0A0A12d-surface #12121Ad-violet #7C5CFFd-cyan #22D3EEd-emerald #10B981d-amber #F59E0Bd-danger #EF4444rounded-2xl 24px (card warm)rounded-3xl 32px (hero, big card)rounded-md 8px (input, button dark)text-xs 12px (label min)text-sm 14px (table, dense)text-base 16px (body)text-lg 18px (article body)shadow-md card hover warmshadow-glow-violet CTA darkbg-mesh-warm hero bg landingbg-mesh-dark hero bg dashboard.tab-num tabular numsfont-sans Interfont-display Plus Jakarta Sansfont-serif Instrument Serif (warm only)font-mono IBM Plex Mono (dark only)bg-warm-coral text-white rounded-2xl px-6 py-3
bg-dark-violet text-white rounded-md px-5 py-2.5
tokens/tokens.csstokens/tailwind.preset.jsshowcase/01-primitives.htmlshowcase/02-composites.htmlshowcase/03-dataviz.htmlshowcase/04-patterns.html_previews/page-A-F.htmlw-coral → #8B4513 nâu trầm hương. Code vẫn dùng bg-warm-coral, render theo brand. Hiện tại tạm hardcode hex An Nhien trong file landing An Nhien — em sẽ migrate sau khi preset xong.
cp lại). Project WordPress: import từ kit thì cập nhật. Em không auto-push update — anh control timing.
Mở gallery, chọn archetype, copy mockup gần nhất, replace content. Xong 30 phút.