# Master UI > Master UI 是搭配 Master CSS 使用的原生 HTML 與 CSS 介面元件庫。每個元件的契約都列出類別、套用位置、樣式表會呈現的狀態、公開自訂屬性,以及最精簡的正確標記。區塊和頁面也提供可直接複製的標記。 撰寫 Master UI 標記時,請遵循以下規則。 - 在原生元素上使用元件類別,例如 ``、``、``。採用契約指定的元素。 - 將修飾類別和基礎類別加在同一個元素上,例如 `btn btn-sm`,不要單獨使用 `btn-sm`。將部件放在根元件內,例如把 `dialog-title` 放進 `dialog`。 - 使用契約列出的原生或 ARIA 屬性標示狀態,例如 `disabled`、`aria-pressed="true"`、`aria-selected="true"` 或 `open`。請勿新增狀態類別,也不要使用契約未列出的類別,例如 `btn-secondary` 或 `btn-outline`。 - 用標記中的 Master CSS utility(如 `flex gap-md p-lg`)排版。請勿另寫 CSS 調整元件的底色、邊框或陰影,應設定主題 token 或公開自訂屬性。 - 浮動介面使用平台功能。以 `command="show-modal"` 和 `commandfor` 開啟 ``,或搭配使用 `popover` 屬性與 `popovertarget`。請勿另加定位或將焦點限制在浮動介面內的腳本。 - 如果契約標示 `"script": "required"`,請從 `@master/ui/behaviors` 接入對應的參考腳本。 - 在 React、Svelte 和 Vue 中,依框架語法撰寫相同的標記。不要為了替類別改名而寫一層包裝元件,例如 ``。只有持有狀態的互動才提供框架元件。用 `npx master-ui add ` 將其原始碼複製到專案。可用元件包括 avatar, calendar, carousel, chart, color-picker, combobox, command, compare, cropper, dial, dialog, editable, field, gantt, gradient, kanban, listbox, log, menu, otp, panel, player, popover, schedule, signature, sortable, splitter, stepper, tabs, tags, toast, toolbar, tooltip, tour, transcript, tree, wheel。 - 執行 `npx master-ui check`,找出不符合契約的標記。 - 調整外觀時,依下列順序採用第一個能達成需求的做法。先考慮元素上的 utility,再依序考慮主題 token、公開自訂屬性、主題檔案,最後才用 `npx master-ui own ` 接手元件原始碼。詳見自訂指南。 元件庫與可重複使用的程式碼範例皆採用 MIT 授權。[授權條款](https://ui.master.co/license.txt) [所有契約](https://ui.master.co/contracts.json)、[契約結構描述](https://ui.master.co/contract.schema.json)、[主題 token](https://ui.master.co/theme.json)、[登錄庫](https://ui.master.co/r/registry.json)、[純 CSS 版本](https://ui.master.co/standalone.css) ## 指南 - [Master UI 簡介](https://ui.master.co/tw/guide/introduction.md): 在安裝 Master UI 之前,先了解原生標記、元件契約、主題與選用行為如何搭配運作。 - [安裝](https://ui.master.co/tw/guide/installation.md): 安裝鎖定版本的套件,選擇原始或預先編譯的 CSS,並驗證第一個元件。 - [與 AI 協作](https://ui.master.co/tw/guide/ai.md): 提供與專案版本相符的契約給代理程式,檢查代理程式變更的標記,並在接受變更前驗證實際呈現的介面。 - [設計](https://ui.master.co/tw/guide/design.md): Master UI 的設計取捨,涵蓋材質角色、連續圓角、狀態回饋與自訂範圍。 - [預設主題](https://ui.master.co/tw/guide/theme.md): Moonstone 與 Obsidian:Master UI 的預設材質、token 用途與實作數值。 - [主題設計](https://ui.master.co/tw/guide/theming.md): 以 Paper 為實作範例,覆寫 token、定義材質配方,打造自己的主題。 - [自訂](https://ui.master.co/tw/guide/customization.md): 依變更需求選擇合適的層級:utility、主題 token、元件屬性、主題,或接管原始碼。 - [接手維護原始碼](https://ui.master.co/tw/guide/registry.md): 選擇從套件匯入、從已安裝版本建立可追蹤的副本,或從登錄庫取得檔案,再將複製的原始碼接入專案。 - [選擇元件](https://ui.master.co/tw/guide/choosing.md): 依任務、內容是否需要持續顯示,以及輸入需求選擇元件,再確認其契約與腳本需求。 - [行為](https://ui.master.co/tw/guide/behaviors.md): 在原生 JavaScript 或框架中掛載參考行為、讀取其值、監聽事件,並管理其生命週期。 - [React、Svelte 和 Vue](https://ui.master.co/tw/guide/frameworks.md): 將有狀態的元件複製到 React、Svelte 或 Vue,與應用程式的值同步,並確保伺服器產生的標記正確。 - [契約](https://ui.master.co/tw/guide/contracts.md): 閱讀元件標記與公開屬性,瞭解檢查器能驗證哪些項目,並用契約描述自己的元件。 - [富文字](https://ui.master.co/tw/guide/rich-text.md): 將 Tiptap 放進編輯器外框:固定的工具列、欄位的各種狀態,以及以資料表示的文件。 - [使用圖表](https://ui.master.co/tw/guide/charts.md): 依用途選擇圖表,用同一個控制項操作多張圖表,並掌握何時適合使用圖表引擎。 - [圖片調整](https://ui.master.co/tw/guide/image-adjustments.md): 在瀏覽器中以裁切器裁切、旋轉並調整圖片,再將原始檔案和調整內容以資料形式交出。 - [瀏覽器支援](https://ui.master.co/tw/guide/browser-support.md): 確認基本需求,分辨哪些備援會自動生效、哪些需要應用程式處理,並在目標瀏覽器中驗證元件。 - [穩定性](https://ui.master.co/tw/guide/stability.md): 辨識公開介面,了解各類版本可能帶來的變更,並掌控專案升級時使用的原始碼與主題。 ## 元件 - [表面](https://ui.master.co/tw/components/surface.md): 托盤、面板與凹槽構成所有元件共用的材質層次。 - [卡片](https://ui.master.co/tw/components/card.md): 帶有浮起效果的面板,各部分會依卡片可用空間調整。 - [票券](https://ui.master.co/tw/components/ticket.md): 帶有撕線的紙張,可呈現通行證、優惠券,或附有存根的收據。 - [堆疊](https://ui.master.co/tw/components/pile.md): 將多個項目呈現為一組,並在最上層面板下方露出堆疊的邊緣。 - [分類色](https://ui.master.co/tw/components/category.md): 標示資料屬於哪個分類的具名色彩。 - [分隔線](https://ui.master.co/tw/components/divider.md): 以一條細線分隔區段,可加上標籤。 - [紋理](https://ui.master.co/tw/components/texture.md): 在表面鋪上圓點、格線、斜紋、交叉斜紋或棋盤格。 - [排列方式](https://ui.master.co/tw/components/arrangements.md): 直向堆疊、橫向群組、分列兩端與置中,是多數版面配置的四種基本做法。 - [自動網格](https://ui.master.co/tw/components/auto-grid.md): 在可用空間內排入最多等寬欄,由網格自行計算欄數。 - [Bento 版面](https://ui.master.co/tw/components/bento.md): 在同一容器內排列幾種尺寸的區塊,欄數隨可用空間調整。 - [瀑布流](https://ui.master.co/tw/components/masonry.md): 高低不一的區塊緊密排入各欄,底下不留多餘空隙。 - [可延伸欄](https://ui.master.co/tw/components/breakout.md): 維持適合閱讀的欄寬,讓圖片或橫幅可以超出欄位,甚至延伸至兩側邊緣。 - [黏附堆疊](https://ui.master.co/tw/components/sticky-stack.md): 隨著頁面捲動,面板會逐一在前一張下方停住並疊起來。 - [表單](https://ui.master.co/tw/components/form.md): 讓列、區段和操作按鈕隨欄寬調整,維持一致的表單版面配置。 - [捲動區域](https://ui.master.co/tw/components/scroll-area.md): 內容超出哪一側的邊緣,該側就會淡出。 - [分隔調整桿](https://ui.master.co/tw/components/splitter.md): 兩個窗格與中間的拖曳把手,可用來調整窗格各自占用的空間。 - [滑動操作列](https://ui.master.co/tw/components/swipe.md): 將整列向側邊滑開,即可顯示可用的操作。 - [可排序清單](https://ui.master.co/tw/components/sortable.md): 拖曳把手或使用按鍵即可調整項目順序的清單。 - [看板](https://ui.master.co/tw/components/kanban.md): 由多個欄組成的看板,可透過拖曳、按鍵或選擇位置,在欄內或跨欄移動項目。 - [捲動顯現](https://ui.master.co/tw/components/reveal.md): 內容隨捲動進入畫面時淡入並微微上升,使用捲動驅動動畫,不需要腳本。 - [折疊面板](https://ui.master.co/tw/components/accordion.md): 以原生元素呈現可展開的清單,每列展開至內容所需的高度。 - [展開文字](https://ui.master.co/tw/components/expand.md): 長文先顯示開頭幾行,使用者可展開閱讀全文。 - [按鈕](https://ui.master.co/tw/components/button.md): 凸起的控制項,懸停時微微抬升,按下時向內凹陷。 - [工具列](https://ui.master.co/tw/components/toolbar.md): 小型凸起表面,容納一排低調的控制項。 - [連結](https://ui.master.co/tw/components/link.md): 沿用句子的文字顏色,帶使用者前往其他位置。 - [輸入欄位](https://ui.master.co/tw/components/input.md): 採內凹樣式的文字欄位,支援標籤、提示、錯誤訊息與群組。 - [下拉選單](https://ui.master.co/tw/components/select.md): 原生下拉選單,選項清單採用與介面一致的樣式。 - [組合方塊](https://ui.master.co/tw/components/combobox.md): 輸入文字時開啟清單方塊、顯示相符選項的文字欄位,也就是可以打字的下拉選單。 - [清單方塊](https://ui.master.co/tw/components/listbox.md): 供使用者選擇的清單,也是組合方塊與指令面板展開時顯示的介面。 - [標籤輸入](https://ui.master.co/tw/components/tags.md): 將輸入的文字轉成值的欄位,每個值都以膠囊標籤顯示在凹槽內。 - [行內編輯](https://ui.master.co/tw/components/editable.md): 平時以文字顯示、可在原處變成欄位的值。 - [核取方塊](https://ui.master.co/tw/components/checkbox.md): 勾選後會填上顏色的原生小方框。 - [單選按鈕](https://ui.master.co/tw/components/radio.md): 可從多個選項中選出一項的小圓形控制項,直接使用原生單選按鈕。 - [開關](https://ui.master.co/tw/components/switch.md): 珍珠色滑塊會滑到以介面前景色呈現的軌道上,適用於立即生效的設定。 - [滑桿](https://ui.master.co/tw/components/slider.md): 原生範圍輸入控制項,搭配纖細的凹槽和珍珠般的滑塊。 - [範圍滑桿](https://ui.master.co/tw/components/range.md): 在同一條軌道上選擇兩個值,例如最低與最高價格,並填色標示兩值之間的範圍。 - [旋鈕](https://ui.master.co/tw/components/dial.md): 沿著圓周轉動滑塊來設定數值,例如以旋鈕方式調整的程度、角度或方向。 - [分段控制項](https://ui.master.co/tw/components/segmented.md): 在同一條軌道上排列數個選項,選取指示會滑到目前的選項。 - [編輯器](https://ui.master.co/tw/components/editor.md): 富文字編輯器的外框:工具列、文件內容及兩者的狀態。 - [膠囊標籤](https://ui.master.co/tw/components/chip.md): 用於切換篩選條件或顯示可移除值的小型膠囊標籤。 - [色票](https://ui.master.co/tw/components/swatch.md): 以帶細緻邊緣的圓形色票顯示或選取顏色。 - [顏色選擇器](https://ui.master.co/tw/components/color-picker.md): 可選擇任何顏色:在明度與彩度的平面上點選,調整色相與不透明度,或直接輸入。 - [漸層](https://ui.master.co/tw/components/gradient.md): 製作中的漸層:色標排在一條橫條上,目前選取的色標以取色器調整,並可設定類型、角度與中心點。 - [選項](https://ui.master.co/tw/components/choice.md): 有足夠空間說明內容的單選或核取方塊選項。 - [投票調查](https://ui.master.co/tw/components/poll.md): 提出一個問題,讓使用者從數個答案中選擇,並在選擇後顯示票數分布。 - [量尺](https://ui.master.co/tw/components/scale.md): 從代表兩端之間不同程度的一列數字中選出一個答案。 - [檢查清單](https://ui.master.co/tw/components/checklist.md): 一份會統計已完成項目數的簡短檢查清單。 - [星等評分](https://ui.master.co/tw/components/rating.md): 以星數表示分數,使用原生單選按鈕,因此鍵盤、表單與螢幕閱讀器都能正常運作。 - [投票](https://ui.master.co/tw/components/vote.md): 讓每位讀者為回答、貼文或留言的分數加一或減一。 - [檔案拖放區](https://ui.master.co/tw/components/dropzone.md): 提供寬大的區域供使用者選取或拖放檔案,建立在原生檔案輸入欄位上,不需要腳本也能運作。 - [簽名板](https://ui.master.co/tw/components/signature.md): 可用手指、觸控筆或滑鼠在簽名區簽名,也可以輸入姓名。 - [OTP](https://ui.master.co/tw/components/otp.md): 逐格輸入一次性驗證碼,每格一個字元,例如簡訊中的六位數字。 - [數字鍵盤](https://ui.master.co/tw/components/keypad.md): 仿手機按鍵排列,方便用拇指輸入代碼或金額。 - [數字步進器](https://ui.master.co/tw/components/stepper.md): 以兩側的按鈕逐步增減中間的數值,適合座位數、數量或字級等。 - [滾輪選擇器](https://ui.master.co/tw/components/wheel.md): 轉動欄位,讓要選取的值停在標記下方。 - [訊息編輯器](https://ui.master.co/tw/components/composer.md): 用來撰寫訊息或提示詞,上方是會自動增高的欄位,下方是一排工具。 - [月曆](https://ui.master.co/tw/components/calendar.md): 以月份呈現可選的日期:可選一天、多天或一段範圍,可顯示一個月份,或並排顯示兩個月份。 - [分頁標籤](https://ui.master.co/tw/components/tabs.md): 用一列文字標籤切換頁面或面板,並以深色底線標示目前選取的項目。 - [導覽列](https://ui.master.co/tw/components/navbar.md): 位於頁面頂端的導覽列,頁面內容捲到它下方時才會顯示背景。 - [底部導覽列](https://ui.master.co/tw/components/tabbar.md): 沿著畫面底部排列小螢幕應用程式的主要入口。 - [Dock](https://ui.master.co/tw/components/dock.md): 放在霧面玻璃托盤上的一排啟動項目,會像透鏡一樣在指標附近放大。 - [導覽清單](https://ui.master.co/tw/components/nav.md): 適合側邊欄或設定頁面的直向導覽清單,目前所在的項目會微微浮起。 - [樹狀檢視](https://ui.master.co/tw/components/tree.md): 以巢狀列呈現有層級的項目,例如資料夾、大綱或分類,不需要腳本也能展開與收合。 - [目錄](https://ui.master.co/tw/components/toc.md): 將頁面標題列成連結,並透過 CSS 標記目前在檢視區中的章節。 - [麵包屑導覽](https://ui.master.co/tw/components/breadcrumb.md): 用連結清單顯示通往目前頁面的路徑,讓讀者可以返回任一上層。 - [分頁導覽](https://ui.master.co/tw/components/pagination.md): 以一列連結切換長清單的各個頁面,目前所在的頁面會呈現按下的凹陷狀態。 - [前後頁導覽](https://ui.master.co/tw/components/pager.md): 在文章底部提供上一篇和下一篇的連結。 - [步驟](https://ui.master.co/tw/components/steps.md): 以編號清單顯示讀者目前在簡短流程中的哪一步,例如結帳或設定流程。 - [略過連結](https://ui.master.co/tw/components/skip.md): 頁面上的第一個連結,取得焦點時才顯示,可略過導覽並跳到內容。 - [對話框](https://ui.master.co/tw/components/dialog.md): 以覆疊面板呈現的原生模態對話框,無須腳本即可開啟和關閉。 - [燈箱](https://ui.master.co/tw/components/lightbox.md): 在原生對話框中放大圖片,顯示於頁面上方。 - [彈出面板](https://ui.master.co/tw/components/popover.md): 錨定在開啟按鈕旁的彈出面板。 - [浮動面板](https://ui.master.co/tw/components/panel.md): 可移動、調整大小、收合至只剩標題列,也可關閉的浮動面板。 - [選單](https://ui.master.co/tw/components/menu.md): 在按鈕旁的彈出視窗中列出可執行的操作。 - [指令面板](https://ui.master.co/tw/components/command.md): 在指令清單上方放置搜尋欄位的對話框。 - [工具提示](https://ui.master.co/tw/components/tooltip.md): 在指標停留、取得焦點或長按時顯示的深色短標籤。 - [導覽提示](https://ui.master.co/tw/components/coachmark.md): 操作導覽中的一個步驟,指向要說明的控制項。 - [浮動通知](https://ui.master.co/tw/components/toast.md): 浮在頁面上方、可自動消失的簡短訊息。 - [提示訊息](https://ui.master.co/tw/components/alert.md): 隨頁面內容排列的訊息,可選擇加上狀態。 - [橫幅](https://ui.master.co/tw/components/banner.md): 在頁面頂端用一行文字傳達所有瀏覽者都該知道的消息。 - [進度](https://ui.master.co/tw/components/progress.md): 隨工作完成逐步填色的細軌道。 - [骨架畫面](https://ui.master.co/tw/components/skeleton.md): 先以即將載入的內容形狀預留版面,內容出現時頁面才不會跳動。 - [微光文字](https://ui.master.co/tw/components/shimmer.md): 以一道掠過文字的亮帶顯示工作正在進行。 - [文字游標](https://ui.master.co/tw/components/caret.md): 出現在尚未寫完的文字末端的標記。 - [旋轉指示器](https://ui.master.co/tw/components/spinner.md): 以細圓環表示尚無法預估完成時間的作業,顏色會沿用周圍文字的顏色。 - [處理中](https://ui.master.co/tw/components/busy.md): 區域重新載入內容時,以遮罩和旋轉指示器呈現處理狀態。 - [定位提示](https://ui.master.co/tw/components/flash.md): 以外框標出連結指向的位置,隨後淡出。 - [空狀態](https://ui.master.co/tw/components/empty.md): 檢視畫面尚無內容可顯示時呈現的狀態。 - [表格](https://ui.master.co/tw/components/table.md): 用細線分隔資料列,提供可排序的欄標題與對齊的數字。 - [資料清單](https://ui.master.co/tw/components/data-list.md): 用欄位名稱與值呈現單一項目的資料,以細線分隔,例如一次部署、一筆訂單或一份個人資料。 - [統計數值](https://ui.master.co/tw/components/stat.md): 呈現單一數值、它衡量的項目及其變動:低調的標籤、大字的數值和變化幅度。 - [捲動數字](https://ui.master.co/tw/components/odometer.md): 數值變動時,各位數會像機械計數器的轉輪一樣滾動到新的數字。 - [倒數計時](https://ui.master.co/tw/components/countdown.md): 以天、時、分、秒顯示距離指定時間還有多久。 - [價格](https://ui.master.co/tw/components/price.md): 以易於閱讀的價格格式呈現金額。 - [圖表](https://ui.master.co/tw/components/chart.md): 用單一 SVG 呈現數值,適應任何寬度,支援從折線圖到旭日圖等二十多種圖表。 - [迷你趨勢線](https://ui.master.co/tw/components/sparkline.md): 用一條細線呈現趨勢,小巧到能放進句子、表格列或統計數值元件。 - [占比分布](https://ui.master.co/tw/components/breakdown.md): 以單一長條呈現整體的組成,各區段的寬度反映其占比。 - [熱圖](https://ui.master.co/tw/components/heatmap.md): 用一格格深淺不同的色塊呈現大量較小的數值,數值越高,顏色越深。 - [服務可用性](https://ui.master.co/tw/components/uptime.md): 每天以一根短線呈現服務的運作狀況,是狀態頁面的基本組成。 - [時間軸](https://ui.master.co/tw/components/timeline.md): 依發生順序將事件排在一條線上,例如動態消息、歷史紀錄或更新日誌。 - [甘特圖](https://ui.master.co/tw/components/gantt.md): 在同一條時間刻度上,以長條呈現各事項的持續時間,例如專案階段、值班班表或發布排程。 - [日程表](https://ui.master.co/tw/components/schedule.md): 將事件依時間排列:單日或一週以垂直時間軸呈現各時段,一個月以各週的事件列呈現,或以議程清單呈現。 - [追蹤記錄](https://ui.master.co/tw/components/trace.md): 逐步呈現代理程式或工作做過的事,每個步驟以低調的單列摘要呈現,有細節時可展開查看。 - [量表](https://ui.master.co/tw/components/meter.md): 顯示已知範圍內的量測值,例如已用的儲存空間、分數或密碼強度。 - [儀表](https://ui.master.co/tw/components/gauge.md): 以圓弧的填滿程度呈現讀值。 - [圖文](https://ui.master.co/tw/components/figure.md): 呈現搭配圖說的圖片或影片,並修飾媒體邊緣。 - [圖片熱點](https://ui.master.co/tw/components/hotspot.md): 在圖片上加上標記,說明各處的內容,例如產品的各個部件或平面圖上的位置。 - [輪播](https://ui.master.co/tw/components/carousel.md): 僅用 CSS 實作、可捲動並自動貼齊的一排或一欄投影片。 - [跑馬燈](https://ui.master.co/tw/components/marquee.md): 循環移動的一列內容,細看時會停下。 - [波形](https://ui.master.co/tw/components/waveform.md): 以一排直條呈現錄音,已播放的部分以文字色填滿。 - [媒體播放器](https://ui.master.co/tw/components/player.md): 在原生音訊或影片元素上套用頁面自己的控制項。 - [逐字稿](https://ui.master.co/tw/components/transcript.md): 以字幕片段呈現錄音的內容,並在播放時跟著進度移動。 - [圖片比較](https://ui.master.co/tw/components/compare.md): 用滑柄移動兩張圖片的分隔線,比較同一事物的不同樣貌。 - [圖片裁切](https://ui.master.co/tw/components/cropper.md): 在圖片上方疊一個框,標出要保留的部分。 - [視窗](https://ui.master.co/tw/components/window.md): 為螢幕擷取畫面、示範或終端機加上應用程式視窗外框。 - [裝置](https://ui.master.co/tw/components/device.md): 以手機外框呈現螢幕截圖、影片或可操作的示範。 - [清單](https://ui.master.co/tw/components/list.md): 將項目逐列排列,每列可放置媒體、文字和尾端內容。 - [檔案](https://ui.master.co/tw/components/file.md): 將單一檔案呈現為帶有名稱的獨立物件,可用於附件、上傳或下載。 - [訊息](https://ui.master.co/tw/components/message.md): 將對話中的一則訊息呈現為指向發言者的氣泡。 - [表情回應](https://ui.master.co/tw/components/reaction.md): 用表情符號回應訊息。每個表情都顯示回應人數,按一下即可加入。 - [討論串](https://ui.master.co/tw/components/thread.md): 由留言與回覆組成,以細線將每則回覆連到它所回應的留言。 - [頭像](https://ui.master.co/tw/components/avatar.md): 以相片或姓名縮寫代表個人或團隊,可單獨顯示或重疊排列。 - [協作者游標](https://ui.master.co/tw/components/presence.md): 以代表某人的顏色顯示他的指標、文字游標或選取範圍。 - [徽章](https://ui.master.co/tw/components/badge.md): 顯示狀態、類別或數量的小型膠囊標籤;只有在顏色具有意義時才使用色彩。 - [圖示](https://ui.master.co/tw/components/icon.md): 透過包含行內圖示的元件設定圖示大小。 - [圖示框](https://ui.master.co/tw/components/icon-frame.md): 在標題旁以指定大小呈現圖示的裝飾框。 - [標題](https://ui.master.co/tw/components/heading.md): 以頁面的高對比文字色呈現標題,搭配上方的前導標籤與下方的引言。 - [引文](https://ui.master.co/tw/components/quote.md): 將他人的話與自己的文字區隔開來。 - [條列清單](https://ui.master.co/tw/components/bullets.md): 用於正文的清單,項目標記獨立成欄。 - [醒目標記](https://ui.master.co/tw/components/mark.md): 像螢光筆一樣標出值得留意的文字。 - [修訂](https://ui.master.co/tw/components/revision.md): 在原句中標示新增與刪除的文字。 - [提及](https://ui.master.co/tw/components/mention.md): 句子中被點名的人、團隊或事物。 - [引註](https://ui.master.co/tw/components/citation.md): 句子中指向資料來源的小型編號標記。 - [程式碼](https://ui.master.co/tw/components/code.md): 以等寬字型呈現原樣文字,可放在行內或獨立成區塊。 - [指令片段](https://ui.master.co/tw/components/snippet.md): 一行可複製的指令,附有終端機提示符號和複製按鈕。 - [按鍵](https://ui.master.co/tw/components/kbd.md): 在內文、選單和提示中以鍵帽呈現快捷鍵,放在文字行內也不會太突兀。 ## 圖表 - [折線圖](https://ui.master.co/tw/charts/line.md): 將依序排列的數值逐點連成線。 - [面積圖](https://ui.master.co/tw/charts/area.md): 在線條下方填入同色底色,可單獨呈現,也可堆疊顯示總量。 - [斜率圖](https://ui.master.co/tw/charts/slope.md): 從線段的斜率與交會,看出兩個時間點之間有哪些數值上升、下降或互換排序。 - [排名變化圖](https://ui.master.co/tw/charts/bump.md): 用線條呈現各項目的排名變化,線條交會處表示名次互換。 - [長條圖](https://ui.master.co/tw/charts/bar.md): 以基準線上的長條比較數量,可並排、堆疊或橫向呈現。 - [雷達圖](https://ui.master.co/tw/charts/radar.md): 用圍繞同一中心的輪廓,呈現幾個對象在相同指標上的表現。 - [瀑布圖](https://ui.master.co/tw/charts/waterfall.md): 逐步呈現起始值經過哪些增減,最後得到結束值。 - [區間圖](https://ui.master.co/tw/charts/range.md): 用兩個數值呈現每個區間的起點與終點。 - [啞鈴圖](https://ui.master.co/tw/charts/dumbbell.md): 用線段連接每個項目的兩個數值,凸顯兩者之間的差距。 - [圓餅圖](https://ui.master.co/tw/charts/pie.md): 用圓形或環形的扇區呈現整體的組成,最好不超過五個部分。 - [圓環圖](https://ui.master.co/tw/charts/donut.md): 用環繞中央數值的扇形區塊呈現整體的組成。 - [多環圖](https://ui.master.co/tw/charts/rings.md): 呈現少量數值,每個數值各用一環顯示占自身總量的比例。 - [馬賽克圖](https://ui.master.co/tw/charts/marimekko.md): 欄寬與各欄的總量成正比,欄內再依組成比例分段。 - [漏斗圖](https://ui.master.co/tw/charts/funnel.md): 呈現同一流程的各個階段,逐段收窄至下一階段。 - [華夫格圖](https://ui.master.co/tw/charts/waffle.md): 用一百個方格呈現整體,每格代表 1%,依各部分的占比填色,讓讀者可以直接數出比例。 - [樹狀矩形圖](https://ui.master.co/tw/charts/treemap.md): 用多個矩形呈現整體的組成,每個矩形的面積代表該部分所占的比例。 - [旭日圖](https://ui.master.co/tw/charts/sunburst.md): 以兩層圓環呈現整體、各部分及其組成。 - [直方圖](https://ui.master.co/tw/charts/histogram.md): 以易讀的數值為界劃分區間,用長條高度呈現各區間的觀測值筆數。 - [盒鬚圖](https://ui.master.co/tw/charts/box.md): 以盒體、中位數線與鬚線呈現每組資料的五個統計值,方便比較各組的分布。 - [熱圖圖表](https://ui.master.co/tw/charts/heatmap.md): 用儲存格的深淺呈現數值在兩個維度上的分布。 - [散佈圖](https://ui.master.co/tw/charts/scatter.md): 比較兩項度量,每個點代表一筆資料。 ## 區塊 - [頁首](https://ui.master.co/tw/blocks/header.md): 網站頁首包含品牌、連結、操作按鈕,以及供窄螢幕使用的抽屜選單。 - [主視覺](https://ui.master.co/tw/blocks/hero.md): 在首屏說清楚這是什麼、為什麼值得關注,並引導訪客採取一項行動。 - [品牌標誌列](https://ui.master.co/tw/blocks/logo-cloud.md): 在主視覺下方,以低調的墨色排成一列,呈現已經信任你的品牌。 - [功能特色](https://ui.master.co/tw/blocks/features.md): 將產品能做的事排成簡短說明的網格:每項包含一個圖示、一句醒目的標題和一句說明。 - [統計數字](https://ui.master.co/tw/blocks/stats.md): 用幾個數字支持你的主張:數字以大字呈現,下方附上低調的說明。 - [客戶推薦](https://ui.master.co/tw/blocks/testimonials.md): 引用客戶的原話,並附上他們的姓名。 - [定價](https://ui.master.co/tw/blocks/pricing.md): 並列各個方案,列出價格、適用對象與包含項目,並突顯其中一個推薦方案。 - [常見問題](https://ui.master.co/tw/blocks/faq.md): 訪客做決定前會提出的問題,就在他們做決定的地方回答。 - [行動呼籲](https://ui.master.co/tw/blocks/cta.md): 在論述之後提出頁面最後一次行動邀請:放在獨立的表面上,再給讀者一次行動的機會。 - [頁尾](https://ui.master.co/tw/blocks/footer.md): 在網站底部,以多欄呈現低調的連結和附註。 - [聯絡我們](https://ui.master.co/tw/blocks/contact.md): 詢問表單,旁邊列出聯絡團隊的其他方式,以及多久會收到回覆。 - [文章列表](https://ui.master.co/tw/blocks/article-list.md): 文章、資源或案例研究:一張圖片、一段摘要、作者,以及進入內容的入口。 - [團隊](https://ui.master.co/tw/blocks/team.md): 產品背後的人,每一位都有姓名、職責和幾句介紹。 - [職缺](https://ui.master.co/tw/blocks/careers.md): 開放中的職缺,列出所屬團隊、地點和聘僱條件,以及應徵方式。 - [整合服務](https://ui.master.co/tw/blocks/integrations.md): 產品可搭配使用的服務,可供瀏覽探索,或以清單列出連線及其狀態。 - [變更紀錄](https://ui.master.co/tw/blocks/changelog.md): 發布了什麼、何時發布,最新的排在最前面,以時間軸或單一版本呈現。 - [頁面標頭](https://ui.master.co/tw/blocks/page-header.md): 在應用程式頁面頂端交代目前位置、頁面用途和可執行的操作。 - [側邊欄](https://ui.master.co/tw/blocks/sidebar.md): 應用程式的側邊欄,包含工作區、導覽和帳號。 - [登入](https://ui.master.co/tw/blocks/sign-in.md): 提供第三方登入、表單欄位與切換連結的登入及註冊卡片。 - [表格檢視](https://ui.master.co/tw/blocks/table-view.md): 具備搜尋、篩選、選取與分頁功能的表格。 - [空狀態區塊](https://ui.master.co/tw/blocks/empty-state.md): 檢視畫面還沒有內容時該顯示什麼,以及如何引導使用者開始。 - [篩選列](https://ui.master.co/tw/blocks/filter-bar.md): 用來縮小清單範圍的條件:先暫存、再套用,並以膠囊標籤顯示。 - [動態紀錄](https://ui.master.co/tw/blocks/activity-feed.md): 依時間分組呈現發生了什麼事、由誰執行,以及涉及哪些項目。 - [訊息對話](https://ui.master.co/tw/blocks/messaging.md): 一段對話:分組的訊息、附件、送達狀態與訊息編輯器。 - [日程檢視](https://ui.master.co/tw/blocks/schedule-view.md): 可依日、週、月或議程檢視的團隊行事曆。 - [選擇卡片](https://ui.master.co/tw/blocks/choice-cards.md): 以包住原生輸入元件的卡片,選擇方案、人員和付款方式。 - [檔案上傳](https://ui.master.co/tw/blocks/file-upload.md): 選擇檔案後,在清單中列出每個檔案的進度、失敗原因和下一步操作。 - [重設密碼](https://ui.master.co/tw/blocks/password-reset.md): 索取重設連結並設定新密碼,兩個步驟各有自己的結果。 - [帳務摘要](https://ui.master.co/tw/blocks/billing-summary.md): 方案、席位與用量、續約日期,以及最近的發票。 - [通知收件匣](https://ui.master.co/tw/blocks/notification-inbox.md): 頁面中的通知:全部或未讀,可逐一標示為已讀,或一次全部標示。 ## 頁面 - [頁面](https://ui.master.co/tw/pages/page.md): 外框至少與檢視區等高,內含頁首、主要區域和頁尾。 - [文件](https://ui.master.co/tw/pages/docs.md): 網站導覽、行寬適合閱讀的文章,以及本頁目錄。 - [聖杯版面](https://ui.master.co/tw/pages/holy-grail.md): 由頁首、三欄和頁尾組成,原始碼中以中間欄為三欄之首。 - [置中版面](https://ui.master.co/tw/pages/centered.md): 將單一任務放在檢視區中央,例如登入或錯誤頁面,可單獨呈現或搭配一側的面板。 - [搜尋結果](https://ui.master.co/tw/pages/results.md): 搜尋欄位、一旁的篩選條件,以及以卡片或清單呈現並分頁的結果。 - [應用程式框架](https://ui.master.co/tw/pages/app-shell.md): 主區域捲動時,側邊欄留在原位。框架較窄時,側邊欄改用抽屜呈現。 - [清單與詳細內容](https://ui.master.co/tw/pages/master-detail.md): 清單與所選項目的詳細內容並列,兩個窗格各自捲動。 - [儀表板](https://ui.master.co/tw/pages/dashboard.md): 上方並列統計數字,下方以網格排列面板,無須媒體查詢即可自動重排。 - [設定](https://ui.master.co/tw/pages/settings.md): 長表單旁有一組簡短的區段導覽。 - [多步驟任務](https://ui.master.co/tw/pages/multi-step.md): 分成幾個步驟的任務:目前的位置、手邊的步驟,以及前進與返回的方式。 - [看板頁面](https://ui.master.co/tw/pages/board.md): 占滿檢視區的看板:各欄橫向捲動,每份清單各自捲動。