此網站需要開啟JavaScript
JavaScript is required

設計 Token

顏色、字級、圓角、陰影、層級、斷點的唯一來源是 tailwind.config.js。這頁直接讀那份設定,不會有第二份會脫節的清單。

色票

DEFAULT 對應到不帶後綴的 class, 例如 bg-brand 就是 brand.DEFAULT。

文字顏色請用 txt 系列而不是 gray 系列 —— 前者才是語意化的文字色階。

brand

brand-light

#A0BEFF

brand

#110AFF

brand-dark

#285388

secondary

secondary-light

#FFE1C6

secondary

#F0923E

secondary-dark

#8C4B1D

success

success

#ABE06D

success-dark

#61A035

alert

alert-light

#F0923E

alert

#E34E1F

bgc

bgc-paper

#FCFCFC

bgc

#D9D9D9

ad

ad

#5A78FF

ad-light

#8CD3F8

gray

gray-50

#f9fafb

gray-100

#F2F4F7

gray-200

#E4E7EC

gray-300

#D0D5DD

gray-400

#98A2B3

gray-500

#667085

gray-600

#475467

gray-700

#1D2939

gray-800

#101828

gray-900

#111827

gray-950

#030712

txt

txt-white

#FFFFFF

txt-super-light

#98A2B3

txt-light

#667085

txt

#475467

txt-dark

#101828

txt-black

#000000

字級

每個語意字級都同時綁定手機與桌機兩組 token, 斷點在 lg。所以寫一個 class 就有 RWD, 不需要自己加 lg: 變體。

用法

區塊標題

內文

補充說明

<!-- 用語意字級,不要直接寫 text-2xl -->
<h2 class="text-zh-head-3">區塊標題</h2>
<p class="text-zh-body-1">內文</p>
<p class="text-zh-mini text-txt-light">補充說明</p>
Class 對應 token 用途 預覽
text-zh-display-1mb/zh/7xl → dt/zh/7xl主視覺標題中文 Ag
text-zh-display-2mb/zh/6xl → dt/zh/6xl次級主視覺中文 Ag
text-zh-head-1mb/zh/5xl → dt/zh/5xl頁面 H1中文 Ag
text-zh-head-2mb/zh/4xl → dt/zh/4xl區塊標題中文 Ag
text-zh-head-3mb/zh/3xl → dt/zh/3xl子區塊標題中文 Ag
text-zh-head-4mb/zh/2xl → dt/zh/2xl卡片標題中文 Ag
text-zh-head-5mb/zh/1xl → dt/zh/1xl小標中文 Ag
text-zh-body-2mb/zh/lg → dt/zh/lg大內文中文 Ag
text-zh-body-1mb/zh/base → dt/zh/base預設內文中文 Ag
text-zh-minimb/zh/xs → dt/zh/xs註解、輔助文字中文 Ag

層級 z-index

500 以上是全站層級表,對應 layouts 裡的 teleport 容器。 請用具名 token,不要再寫 z-[1000] 這種寫死的值。

Props

名稱型別預設值說明
z-sub500—
z-cookie1000—
z-side1001—
z-modal1002—
z-loading1005—
z-drawer1400—
z-drawer-panel1401—
z-preloader2000—

圓角、陰影、斷點

Props

名稱型別預設值說明
rounded-none0—
rounded-sm.125rem—
rounded.25rem—
rounded-lg.5rem—
rounded-full9999px—

Props

名稱型別預設值說明
shadow-btn0px 4px 25px rgba(46, 46, 46, 0.1)—
shadow-card0px 4px 10px rgba(57, 87, 132, 0.2)—
shadow-filter0px 4px 25px rgba(12, 12, 12, 0.1)—

Props

名稱型別預設值說明
sm480px—
md768px—
lg1024px—
xl1280px—
2xl1680px—
3xl1920px—