Colors
Tất cả color tokens — mỗi swatch tự động đổi màu theo light / dark mode. Hex ☀ = light, ☾ = dark.
Surface
Page
portal-page
☀ #ffffff
☾ #22272e
Surface
portal-surface
☀ #ffffff
☾ #2d333b
Surface Muted
portal-surface-muted
☀ #f9fafb
☾ #373e47
Surface Subtle Strong
portal-surface-subtle-strong
☀ #eef2f6
☾ #444c56
Surface Soft
portal-surface-soft
☀ #e5f0ff
☾ rgba(90,156,255,.16)
Surface Hover
portal-surface-hover
☀ #f9fafb
☾ #373e47
Surface Stone
portal-surface-stone
☀ #ebede8
☾ #373e47
Surface Stone Hover
portal-surface-stone-hover
☀ #e0e2dd
☾ #444c56
Border
Border
portal-border
☀ #e5e7eb
☾ #444c56
Border Soft
portal-border-soft
☀ #e5e7eb
☾ #373e47
Border Strong
portal-border-strong
☀ #d1d5db
☾ #545d68
Border Light
portal-border-light
☀ #f3f4f6
☾ #373e47
Text & Heading
Text
portal-text
☀ #071831
☾ #adbac7
Text Strong
portal-text-strong
☀ #111827
☾ #cdd9e5
Text Medium
portal-text-medium
☀ #374151
☾ #adbac7
Text Muted
portal-text-muted
☀ #4b5563
☾ #909dab
Text Secondary
portal-text-secondary
☀ #6b7280
☾ #768390
Text Subtle
portal-text-subtle
☀ #9ca3af
☾ #636e7b
Text Placeholder
portal-text-placeholder
☀ #9ca3af
☾ #768390
Heading
portal-heading
☀ #071831
☾ #cdd9e5
Heading Soft
portal-heading-soft
☀ #001d48
☾ #dbe6f2
Brand
Brand
portal-brand
☀ #0068ff
☾ #0068ff
Brand Hover
portal-brand-hover
☀ #0058d8
☾ #2b82ff
Brand Strong
portal-brand-strong
☀ #001d48
☾ #8bb8ff
Brand Surface
portal-brand-surface
☀ #002d70
☾ #002d70
Brand Surface Light
portal-brand-surface-light
☀ #ebf3ff
☾ rgba(90,156,255,.18)
Brand Surface Lighter
portal-brand-surface-lighter
☀ #0068ff14
☾ rgba(90,156,255,.12)
Brand Border Soft
portal-brand-border-soft
☀ #bccceb
☾ #335f9f
ZBS Brand
portal-zbs-brand
☀ #004838
☾ #004838
ZBS Brand Hover
portal-zbs-brand-hover
☀ #00765c
☾ #00765c
ZT Brand
portal-zt-brand
☀ #073127
☾ #073127
ZT Accent
portal-zt-accent
☀ #e2fb6c
☾ #e2fb6c
Feature Colors
Feature Blue Surface
☀ #dbeafe
☾ rgba(90,156,255,.16)
Feature Blue Icon
☀ #2563eb
☾ #8bb8ff
Feature Green Surface
☀ #dcfce7
☾ rgba(126,226,195,.14)
Feature Green Icon
☀ #16a34a
☾ #7ee2c3
Feature Purple Surface
☀ #f3e8ff
☾ rgba(210,168,255,.14)
Feature Purple Icon
☀ #9333ea
☾ #d2a8ff
Feature Amber Surface
☀ #fef9c3
☾ rgba(242,204,96,.15)
Feature Amber Icon
☀ #d97706
☾ #f2cc60
Feature Red Surface
☀ #fee2e2
☾ rgba(244,112,103,.14)
Feature Red Icon
☀ #ef4444
☾ #f47067
Feature Indigo Surface
☀ #e0e7ff
☾ rgba(139,184,255,.14)
Feature Indigo Icon
☀ #4f46e5
☾ #a8c7ff
Feature Teal Surface
☀ #ccfbf1
☾ rgba(126,226,195,.16)
Semantic (Warning, Success, Code)
Warning
portal-warning
☀ #9a6700
☾ #f2cc60
Warning Surface
portal-warning-surface
☀ #fff9db
☾ rgba(242,204,96,.14)
Warning Border
portal-warning-border
☀ #fde68a
☾ rgba(242,204,96,.42)
Success
portal-success
☀ #16915f
☾ #7ee2c3
Success Surface Light
portal-success-surface-light
☀ #eafaf2
☾ rgba(126,226,195,.14)
Success Accent
portal-success-accent
☀ #d6ff66
☾ #d6ff66
Code Surface
portal-code-surface
☀ #262626
☾ #1c2128
Code Text
portal-code-text
☀ #e5e7eb
☾ #cdd9e5
Sidebar
Sidebar BG
portal-sidebar-bg
☀ #ffffff
☾ #22272e
Section Label
portal-sidebar-section-label
☀ #9ca3af
☾ #768390
Item Text
portal-sidebar-item-text
☀ #4b5563
☾ #adbac7
Item Icon
portal-sidebar-item-icon
☀ #6b7280
☾ #909dab
Item Hover BG
portal-sidebar-item-hover-bg
☀ #f3f4f6
☾ #373e47
Item Active BG
portal-sidebar-item-active-bg
☀ #eef4ff
☾ rgba(90,156,255,.16)
Item Active Text
portal-sidebar-item-active-text
☀ #0068ff
☾ #8bb8ff
Typography
Type scale và font tokens. Tất cả text dùng portal-color-text variables → tự động đổi màu.
Sans-serif
--ifm-font-family-base
Roboto
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z · 0 1 2 3 4 5 6 7 8 9
"Roboto", "Segoe UI", "Helvetica Neue", "Arial", ui-sans-serif, system-ui, sans-serif
Monospace
--ifm-font-family-monospace
Fira Code
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z · 0 1 2 3 4 5 6 7 8 9
constfunction=>asyncawaitzmp.showToast()0x1A2B3C"Fira Code", "SFMono-Regular", "SF Mono", ui-monospace, monospace
Spacing
4px base scale — dùng class `p-portal-N` hoặc `gap-portal-N`.
Border Radius
Radius scale theo context của surface.
portal-sm
8px · --portal-radius-sm
portal-md
12px · --portal-radius-md
portal-lg
16px · --portal-radius-lg
portal-chip
10px · --portal-radius-chip
portal-input
12px · --portal-radius-input
portal-card
16px · --portal-radius-card
portal-panel
28px · --portal-radius-panel
portal-pill
9999px · --portal-radius-pill
Shadows
Box shadow tokens — tự điều chỉnh opacity theo dark mode.
Badges
PortalBadge — tất cả variants và leading dot.
Variants
With Leading Dot
Icon Box
IconBox — tones và sizes.
Tones (size: md)
Sizes (tone: brand)
Icons
Custom SVG glyphs (portal-icons.tsx) + Tabler Icons. Hover để xem tên.
Design icons — custom SVG glyphs
Utility icons — Tabler Icons
Sidebar icons — Phosphor Icons (weight: fill)
Patterns
Recurring UI patterns dùng trong docs và landing pages.
Callouts
Code Block (design system internal)
Page({
data: { message: "Welcome to Mini App" },
handleTap() {
zmp.showToast({ message: "Button clicked" });
},
});QuickCodeBlock
Dark code block tái sử dụng — filename label + copy button. Import từ @/components/ui/quick-code-block
npm install -g zmp-cli
{
"app": {
"appId": "YOUR_APP_ID",
"appName": "My Mini App"
}
}
const token = await axios.post(
"https://oauth.zaloapp.com/v4/access_token",
{ app_id: APP_ID, secret_key: SECRET_KEY, grant_type: "authorization_code" }
);
Product Card
Mini App Platform
Build lightweight apps that run inside Zalo.
View DocsSurface Card Variants
portal-surface-card
Surface variant
--subtle
Surface variant
--brand
Surface variant
Markdown Typography (.markdown)
H1 — 2.25rem / bold
H2 — 1.5rem / bold
H3 — 1.25rem / semibold
H4 — 0.875rem / semibold
Body paragraph — 1rem / regular. Mini Apps are built using standard web technologies with Zalo's platform capabilities layered on top.
- List item — 0.875rem / regular
- Inline
code— 0.875rem / mono
Animations
Motion tokens — định nghĩa duration, easing và keyframe cho từng loại animation trong portal. Click Replay để xem trực tiếp.
Content Block
Dùng khi chuyển trang trong ECOSYSTEM sidebar. Content mới xuất hiện từ opacity 0 lên 1, tạo cảm giác chuyển trang mượt mà.
Duration
450ms
Easing
ease-in-out
Fill
backwards
Keyframes
opacity: 0 → 1
/* LandingLayout: <main data-ecosystem-page> */
el.animate(
[{ opacity: "0" }, { opacity: "1" }],
{ duration: 350, easing: "ease-in-out", fill: "backwards" }
);Nguyên tắc
- • Dùng Web Animations API (
el.animate()) để trigger động — không dùng CSS class toggle. - • Cancel animation đang chạy trước khi replay:
el.getAnimations().forEach(a => a.cancel()) - •
fill: "backwards"giữ frame đầu tiên (opacity 0) trong giai đoạn delay, tránh flash. - • Respect
prefers-reduced-motioncho accessibility khi cần.
Social Patterns
Các pattern UI đặc thù cho trang Social — Glass Card trên nền tối và Plugin Demo Card.
Glass Card (dark surface)
Dùng trên nền tối gradient. Backdrop blur + white/10 bg + white/20 border. Thấy trong section "Bạn Có Thể Xây Dựng Gì" ở trang Social.
Đăng Nhập Xã Hội
Xác thực một lần nhấp với tài khoản Zalo
Chia Sẻ Nội Dung
Chia sẻ trực tiếp lên bảng tin Zalo
Truy Cập Hồ Sơ
Lấy dữ liệu hồ sơ với quyền truy cập
<div class="rounded-[12px] border border-white/20 bg-white/10 p-4 backdrop-blur-sm"> {/* content */} </div>Plugin Demo Card
Card 3 vùng: Header (icon + title + description + CTA button) → Demo area (light bg) → Code block (dark bg #111827). Dùng trong "Plugin Xã Hội".
Tên Plugin
Mô tả ngắn về chức năng của plugin này.
<div class="zalo-plugin" data-option="value"> </div>SDK Card
Card đơn giản cho SDK — icon lớn (56×56) + title + description + version + link dọc theo layout. Dùng trong "Tích Hợp SDK".
JavaScript SDK
Mô tả ngắn về SDK này và các nền tảng được hỗ trợ.
Android SDK
Mô tả ngắn về SDK này và các nền tảng được hỗ trợ.
iOS SDK
Mô tả ngắn về SDK này và các nền tảng được hỗ trợ.