組合方塊
輸入文字時開啟清單方塊、顯示相符選項的文字欄位,也就是可以打字的下拉選單。
本頁內容
組合方塊是可輸入文字的選擇控制項,會開啟清單方塊來顯示相符選項。它由現有的輸入群組和浮動清單方塊組成,兩者以 combobox 包裝元素相連。樣式表負責定位和外觀。combobox 行為負責篩選選項、在選項間移動,以及將選取的值填入欄位。
組合方塊
<div class="field max-w(320) mx-auto"> <label for="region">Region</label> <div class="combobox"> <div class="input-group"> <input class="input-group-field" id="region" role="combobox" aria-expanded="false" aria-controls="region-list" aria-autocomplete="list" autocomplete="off" placeholder="Search regions"> <button type="button" class="combobox-toggle" tabindex="-1" aria-label="Show regions"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(90 8 8)" /> </svg> </button> </div> <div id="region-list" popover="manual" class="listbox" role="listbox" aria-label="Regions"> <div class="listbox-option" role="option" id="region-hnd" aria-checked="false">Tokyo</div> <div class="listbox-option" role="option" id="region-sin" aria-checked="false">Singapore</div> <div class="listbox-option" role="option" id="region-fra" aria-checked="false">Frankfurt</div> <div class="listbox-option" role="option" id="region-lhr" aria-checked="false">London</div> <div class="listbox-option" role="option" id="region-iad" aria-checked="false">Virginia</div> <div class="listbox-option" role="option" id="region-pdx" aria-checked="false" aria-disabled="true"> Oregon </div> <div class="listbox-empty">No regions match.</div> </div> </div></div><script type="module"> import { attach } from '@master/ui/behaviors' attach()</script>import { useEffect, useRef } from 'react'import { attach } from '@master/ui/behaviors'import ChevronDownIcon from '@master/icons-react/native/16/soft/chevron-down'export function Example() { const root = useRef<HTMLDivElement>(null) useEffect(() => attach(root.current!), []) return ( <div ref={root} className="field max-w(320) mx-auto"> <label htmlFor="region">Region</label> <div className="combobox"> <div className="input-group"> <input className="input-group-field" id="region" role="combobox" aria-expanded="false" aria-controls="region-list" aria-autocomplete="list" autoComplete="off" placeholder="Search regions" /> <button type="button" className="combobox-toggle" tabIndex={-1} aria-label="Show regions"> <ChevronDownIcon className="icon" /> </button> </div> <div id="region-list" popover="manual" className="listbox" role="listbox" aria-label="Regions"> <div className="listbox-option" role="option" id="region-hnd" aria-checked="false">Tokyo</div> <div className="listbox-option" role="option" id="region-sin" aria-checked="false"> Singapore </div> <div className="listbox-option" role="option" id="region-fra" aria-checked="false"> Frankfurt </div> <div className="listbox-option" role="option" id="region-lhr" aria-checked="false"> London </div> <div className="listbox-option" role="option" id="region-iad" aria-checked="false"> Virginia </div> <div className="listbox-option" role="option" id="region-pdx" aria-checked="false" aria-disabled="true"> Oregon </div> <div className="listbox-empty">No regions match.</div> </div> </div> </div> )}<script> import { attach } from '@master/ui/behaviors' import ChevronDownIcon from '@master/icons-svelte/native/16/soft/chevron-down'</script><div class="field max-w(320) mx-auto" {@attach attach}> <label for="region">Region</label> <div class="combobox"> <div class="input-group"> <input class="input-group-field" id="region" role="combobox" aria-expanded="false" aria-controls="region-list" aria-autocomplete="list" autocomplete="off" placeholder="Search regions"> <button type="button" class="combobox-toggle" tabindex="-1" aria-label="Show regions"> <ChevronDownIcon class="icon" /> </button> </div> <div id="region-list" popover="manual" class="listbox" role="listbox" aria-label="Regions"> <div class="listbox-option" role="option" id="region-hnd" aria-checked="false">Tokyo</div> <div class="listbox-option" role="option" id="region-sin" aria-checked="false">Singapore</div> <div class="listbox-option" role="option" id="region-fra" aria-checked="false">Frankfurt</div> <div class="listbox-option" role="option" id="region-lhr" aria-checked="false">London</div> <div class="listbox-option" role="option" id="region-iad" aria-checked="false">Virginia</div> <div class="listbox-option" role="option" id="region-pdx" aria-checked="false" aria-disabled="true"> Oregon </div> <div class="listbox-empty">No regions match.</div> </div> </div></div><script setup>import { onMounted, onUnmounted, ref } from 'vue'import { attach } from '@master/ui/behaviors'import ChevronDownIcon from '@master/icons-vue/native/16/soft/chevron-down'const root = ref(null)let detachonMounted(() => { detach = attach(root.value) })onUnmounted(() => detach?.())</script><template> <div ref="root" class="field max-w(320) mx-auto"> <label for="region">Region</label> <div class="combobox"> <div class="input-group"> <input class="input-group-field" id="region" role="combobox" aria-expanded="false" aria-controls="region-list" aria-autocomplete="list" autocomplete="off" placeholder="Search regions"> <button type="button" class="combobox-toggle" tabindex="-1" aria-label="Show regions"> <ChevronDownIcon class="icon" /> </button> </div> <div id="region-list" popover="manual" class="listbox" role="listbox" aria-label="Regions"> <div class="listbox-option" role="option" id="region-hnd" aria-checked="false">Tokyo</div> <div class="listbox-option" role="option" id="region-sin" aria-checked="false"> Singapore </div> <div class="listbox-option" role="option" id="region-fra" aria-checked="false"> Frankfurt </div> <div class="listbox-option" role="option" id="region-lhr" aria-checked="false">London</div> <div class="listbox-option" role="option" id="region-iad" aria-checked="false"> Virginia </div> <div class="listbox-option" role="option" id="region-pdx" aria-checked="false" aria-disabled="true"> Oregon </div> <div class="listbox-empty">No regions match.</div> </div> </div> </div></template>#樣式表的作用
- 位置。
combobox包裝元素將自身設為具名錨點,並將名稱的作用域限制在自身範圍內。清單方塊會在整個欄位下方 6px 處開啟,不以文字游標或按鈕為基準,並透過anchor-size()確保寬度至少與欄位相同。無須另外量測尺寸,同一頁上的多個組合方塊也能各自運作。 - 箭頭。
combobox-toggle是欄位末端的小按鈕,內含箭頭圖示。當欄位為aria-expanded="true"時,箭頭會翻轉。 - 空白狀態。 所有選項都設為
hidden時,listbox-empty會自動顯示。 - 欄位狀態。 指標停留、焦點、無效及停用狀態均由輸入群組提供。
瀏覽器若不支援錨點定位,清單方塊仍可開啟,並依它在標記中的位置直接顯示在欄位下方,寬度為清單方塊本身的寬度。
#行為
combobox 接收根元素(也就是帶有 combobox 類別的元素)和選項物件,並傳回用來解除行為的函式。它會透過 role="combobox" 找到欄位,並透過 role="listbox" 找到清單。filter 選項預設為 true;filter: false 會把選項交由頁面處理,如自動完成所示。name、removeLabel 和 draw 與多個值有關。
import { combobox } from '@master/ui/behaviors/combobox.js'const box = combobox(document.querySelector('.combobox'))box.value // what the chosen option stands for, or nullbox.query // the text in the field它傳回的函式有兩個屬性,可從外部讀取和設定。設定任一屬性都不會派送事件。
-
value是所選選項代表的值,也就是它的data-value或文字;當欄位中的文字並未對應到任何已選選項時為 null。設定它會勾選該選項,並將其文字寫入欄位。 -
query是欄位中的文字,也就是讀者正在搜尋的內容。它不是值:每按一個鍵就會改變,選定選項後則是該選項的文字。設定它會寫入欄位,並像輸入文字時一樣篩選選項。 -
輸入文字時,不包含輸入文字的選項會設為
hidden,比對不分大小寫。清單會開啟,第一個相符項目會成為作用中選項。 -
作用中選項設為
aria-selected="true",並由欄位上的aria-activedescendant指向。焦點會留在欄位內。 -
選取選項時,可按 Enter 或用指標操作。選項文字會填入欄位,略過
listbox-description和listbox-end的內容。選取的選項會設為aria-checked="true",其餘設為false,清單隨即關閉。重新輸入並覆寫選取值時,會清除該選項的勾選狀態。 -
開啟與關閉。 清單方塊使用
popover="manual",因此在欄位內輸入或點擊時,清單會維持開啟。點擊欄位或切換按鈕,或按方向鍵,都會開啟清單。按 Esc 或焦點離開組合方塊時,會關閉清單。行為也會同步更新aria-expanded。 -
事件。 選取選項時,欄位會依序觸發
input和change,與輸入文字時相同。值取自欄位的value。
停用或隱藏的選項會被略過。輸入法組字期間,Enter 和方向鍵會交由輸入法處理。
未掛上行為時,欄位會維持為文字輸入欄位。使用者仍可輸入值,清單則保持關閉。
#多個值
設有 aria-multiselectable="true" 的清單方塊可以容納多個值。這時欄位改用帶有 input-group-wrap 的輸入群組,與標籤輸入相同,每個選取的選項都會以膠囊標籤顯示在欄位前方。選取時會勾選或取消勾選該選項、清空欄位並讓清單維持開啟,只要再按幾個鍵就能加入下一個值。選項會保留勾選狀態,因此清單和膠囊標籤一樣能看出已選取哪些值。
多個值
<div class="field max-w(360) mx-auto"> <label for="regions">Regions</label> <div class="combobox"> <div class="input-group input-group-wrap"> <span class="chip" data-value="hnd"> Tokyo<input type="hidden" name="regions" value="hnd"><button type="button" class="chip-remove" tabindex="-1" aria-label="Remove Tokyo"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button> </span> <input class="input-group-field" id="regions" role="combobox" aria-expanded="false" aria-controls="regions-list" aria-autocomplete="list" autocomplete="off" placeholder="Add a region"> <button type="button" class="combobox-toggle" tabindex="-1" aria-label="Show regions"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(90 8 8)" /> </svg> </button> </div> <div id="regions-list" popover="manual" class="listbox" role="listbox" aria-label="Regions" aria-multiselectable="true"> <div class="listbox-option" role="option" data-value="hnd" aria-checked="true">Tokyo</div> <div class="listbox-option" role="option" data-value="sin" aria-checked="false"> Singapore </div> <div class="listbox-option" role="option" data-value="fra" aria-checked="false"> Frankfurt </div> <div class="listbox-option" role="option" data-value="lhr" aria-checked="false">London</div> <div class="listbox-option" role="option" data-value="iad" aria-checked="false">Virginia</div> <div class="listbox-empty">No regions match.</div> </div> </div></div><script type="module"> import { attach } from '@master/ui/behaviors' attach()</script>import { useEffect, useRef } from 'react'import { attach } from '@master/ui/behaviors'import XIcon from '@master/icons-react/native/16/soft/x'import ChevronDownIcon from '@master/icons-react/native/16/soft/chevron-down'export function Example() { const root = useRef<HTMLDivElement>(null) useEffect(() => attach(root.current!), []) return ( <div ref={root} className="field max-w(360) mx-auto"> <label htmlFor="regions">Regions</label> <div className="combobox"> <div className="input-group input-group-wrap"> <span className="chip" data-value="hnd"> Tokyo<input type="hidden" name="regions" value="hnd" /><button type="button" className="chip-remove" tabIndex={-1} aria-label="Remove Tokyo"> <XIcon className="icon" /> </button> </span> <input className="input-group-field" id="regions" role="combobox" aria-expanded="false" aria-controls="regions-list" aria-autocomplete="list" autoComplete="off" placeholder="Add a region" /> <button type="button" className="combobox-toggle" tabIndex={-1} aria-label="Show regions"> <ChevronDownIcon className="icon" /> </button> </div> <div id="regions-list" popover="manual" className="listbox" role="listbox" aria-label="Regions" aria-multiselectable="true"> <div className="listbox-option" role="option" data-value="hnd" aria-checked="true">Tokyo</div> <div className="listbox-option" role="option" data-value="sin" aria-checked="false"> Singapore </div> <div className="listbox-option" role="option" data-value="fra" aria-checked="false"> Frankfurt </div> <div className="listbox-option" role="option" data-value="lhr" aria-checked="false"> London </div> <div className="listbox-option" role="option" data-value="iad" aria-checked="false"> Virginia </div> <div className="listbox-empty">No regions match.</div> </div> </div> </div> )}<script> import { attach } from '@master/ui/behaviors' import XIcon from '@master/icons-svelte/native/16/soft/x' import ChevronDownIcon from '@master/icons-svelte/native/16/soft/chevron-down'</script><div class="field max-w(360) mx-auto" {@attach attach}> <label for="regions">Regions</label> <div class="combobox"> <div class="input-group input-group-wrap"> <span class="chip" data-value="hnd"> Tokyo<input type="hidden" name="regions" value="hnd"><button type="button" class="chip-remove" tabindex="-1" aria-label="Remove Tokyo"> <XIcon class="icon" /> </button> </span> <input class="input-group-field" id="regions" role="combobox" aria-expanded="false" aria-controls="regions-list" aria-autocomplete="list" autocomplete="off" placeholder="Add a region"> <button type="button" class="combobox-toggle" tabindex="-1" aria-label="Show regions"> <ChevronDownIcon class="icon" /> </button> </div> <div id="regions-list" popover="manual" class="listbox" role="listbox" aria-label="Regions" aria-multiselectable="true"> <div class="listbox-option" role="option" data-value="hnd" aria-checked="true">Tokyo</div> <div class="listbox-option" role="option" data-value="sin" aria-checked="false"> Singapore </div> <div class="listbox-option" role="option" data-value="fra" aria-checked="false"> Frankfurt </div> <div class="listbox-option" role="option" data-value="lhr" aria-checked="false">London</div> <div class="listbox-option" role="option" data-value="iad" aria-checked="false">Virginia</div> <div class="listbox-empty">No regions match.</div> </div> </div></div><script setup>import { onMounted, onUnmounted, ref } from 'vue'import { attach } from '@master/ui/behaviors'import XIcon from '@master/icons-vue/native/16/soft/x'import ChevronDownIcon from '@master/icons-vue/native/16/soft/chevron-down'const root = ref(null)let detachonMounted(() => { detach = attach(root.value) })onUnmounted(() => detach?.())</script><template> <div ref="root" class="field max-w(360) mx-auto"> <label for="regions">Regions</label> <div class="combobox"> <div class="input-group input-group-wrap"> <span class="chip" data-value="hnd"> Tokyo<input type="hidden" name="regions" value="hnd"><button type="button" class="chip-remove" tabindex="-1" aria-label="Remove Tokyo"> <XIcon class="icon" /> </button> </span> <input class="input-group-field" id="regions" role="combobox" aria-expanded="false" aria-controls="regions-list" aria-autocomplete="list" autocomplete="off" placeholder="Add a region"> <button type="button" class="combobox-toggle" tabindex="-1" aria-label="Show regions"> <ChevronDownIcon class="icon" /> </button> </div> <div id="regions-list" popover="manual" class="listbox" role="listbox" aria-label="Regions" aria-multiselectable="true"> <div class="listbox-option" role="option" data-value="hnd" aria-checked="true">Tokyo</div> <div class="listbox-option" role="option" data-value="sin" aria-checked="false"> Singapore </div> <div class="listbox-option" role="option" data-value="fra" aria-checked="false"> Frankfurt </div> <div class="listbox-option" role="option" data-value="lhr" aria-checked="false">London</div> <div class="listbox-option" role="option" data-value="iad" aria-checked="false"> Virginia </div> <div class="listbox-empty">No regions match.</div> </div> </div> </div></template>- 欄位只負責搜尋。 輸入文字只會篩選清單,不會取消任何勾選;已選取的值由膠囊標籤保留。
- 膠囊標籤。 欄位是唯一的 Tab 停駐點。在空白欄位中按 Backspace,或按往回方向的方向鍵,就能移到膠囊標籤上,此時的按鍵操作與標籤輸入相同。用移除按鈕或 Backspace 移除膠囊標籤時,會取消勾選對應的選項。
- 表單。 若現有的膠囊標籤已帶有設定
name的隱藏輸入元件,或有傳入name,行為寫入的膠囊標籤就會帶有一個存放該值的隱藏輸入元件。removeLabel用頁面的語言為移除按鈕命名。 - 值是已選取值的清單,依選取的先後排列。
若值是自由輸入、而不是從清單中選取,請使用標籤輸入。
#自動完成
當相符項目來自伺服器,或來自頁面自己的搜尋時,請以 filter: false 掛載行為。它不會隱藏任何選項:在欄位每次觸發 input 時,讀取 query、搜尋它,再把相符項目寫成清單的選項。在觸發搜尋的輸入之後才送達的選項,仍會得到作用中選項,因此 Enter 和方向鍵都能操作它們。
自動完成
<div class="field max-w(320) mx-auto"> <label for="city">City</label> <div class="combobox" id="city-combobox"> <div class="input-group"> <input class="input-group-field" id="city" role="combobox" aria-expanded="false" aria-controls="city-list" aria-autocomplete="list" autocomplete="off" placeholder="Start typing a city"> <button type="button" class="combobox-toggle" tabindex="-1" aria-label="Show cities"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(90 8 8)" /> </svg> </button> </div> <div id="city-list" popover="manual" class="listbox" role="listbox" aria-label="Cities"> <div class="listbox-empty">No cities start with that.</div> </div> </div></div><script>addEventListener('DOMContentLoaded', function () {var root = document.getElementById('city-combobox')var list = document.getElementById('city-list')var cities = ['Amsterdam', 'Athens', 'Auckland', 'Bangkok', 'Barcelona', 'Berlin', 'Bogotá', 'Boston', 'Brussels', 'Buenos Aires', 'Cairo', 'Cape Town', 'Chicago', 'Copenhagen', 'Dublin', 'Frankfurt', 'Helsinki', 'Hong Kong', 'Istanbul', 'Lisbon', 'London', 'Los Angeles', 'Madrid', 'Melbourne', 'Mexico City', 'Montreal', 'Mumbai', 'Nairobi', 'New York', 'Oslo', 'Paris', 'Prague', 'Rome', 'San Francisco', 'Santiago', 'São Paulo', 'Seoul', 'Singapore', 'Stockholm', 'Sydney', 'Taipei', 'Tokyo', 'Toronto', 'Vienna', 'Warsaw', 'Zurich']var box = MasterUI.combobox(root, { filter: false })var asked = 0// Stands for a request to a server: the cities that start with the query, a moment later.function search(query) { return new Promise(function (resolve) { setTimeout(function () { var text = query.trim().toLowerCase() resolve(cities.filter(function (city) { return city.toLowerCase().startsWith(text) }).slice(0, 6)) }, 120) })}function write(matches) { list.querySelectorAll('.listbox-option').forEach(function (option) { option.remove() }) matches.forEach(function (city) { var option = document.createElement('div') option.className = 'listbox-option' option.setAttribute('role', 'option') option.setAttribute('aria-checked', 'false') option.textContent = city list.insertBefore(option, list.querySelector('.listbox-empty')) })}root.addEventListener('input', function (event) { // A choice says input too; its text is the option's, with nothing more to look for. if (event.target.getAttribute('role') !== 'combobox' || box.value !== null) return var ticket = ++asked search(box.query).then(function (matches) { // An answer to an older query that arrives late is dropped. if (ticket === asked) write(matches) })})search('').then(write)})</script><script type="module"> import { attach } from '@master/ui/behaviors' attach()</script>- 讀取
query,而不是事件。 查詢文字就是欄位的文字;無論是讀者輸入的還是框架寫入的,query都以相同方式讀取。 - 選取也會派送
input。 此時文字是所選選項的文字,value也不再是 null:沒有需要搜尋的內容,這時寫入新選項會把已選的選項移除。 - 回應的順序可能錯亂。 只保留最新查詢的回應。
- 空白狀態由樣式表處理。 清單中沒有任何選項時,
listbox-empty會自動顯示。
在 React、Svelte 和 Vue 中,元件的 query 和 onQueryChange(Svelte 中為可繫結的 query,Vue 中為 v-model:query)傳遞的是相同的文字:搜尋它,並把相符項目當作 options 傳入,同時將 filter 設為 false。
#選擇控制項
若純文字選項不超過 12 個,可用下拉選單,無須腳本即可使用平台內建的鍵入定位功能。當清單很長而需要搜尋、選項會隨輸入載入,或每個選項需要呈現較豐富的內容時,請使用組合方塊。
#鍵盤操作
按鍵由行為處理。清單關閉時,或按住 Shift 時,Home 和 End 會像在一般欄位中一樣移動文字游標。沒有作用中選項時,Enter 保留原本的行為,仍可送出表單。
| 按鍵 | 動作 |
|---|---|
| ArrowDown, ArrowUp | 開啟清單並切換作用中選項,移過首尾時會從另一端繼續。 |
| Home, End | 清單展開時,移到第一個或最後一個選項 |
| Enter | 選取目前作用中的選項並關閉清單。多值時,則切換該選項的勾選狀態,並讓清單維持開啟 |
| Escape | 關閉清單,保留欄位中的文字 |
| Typing | 篩選選項並展開清單,定位到第一個符合的選項 |
| Backspace | 多值時,在空白欄位中,移到最後一個膠囊標籤;在膠囊標籤上時,取消勾選對應的選項並移到前一個膠囊標籤;若它原本是第一個,則移到後一個;若已沒有膠囊標籤,則回到欄位 |
| Delete | 多值時,在膠囊標籤上:取消勾選對應的選項並移到後一個膠囊標籤;若它原本是最後一個,則回到欄位 |
| ArrowLeft, ArrowRight | 多值時,從欄位開頭依序在膠囊標籤之間移動,與標籤輸入相同 |
| Home, End | 多值時,在膠囊標籤上:移到第一個膠囊標籤,或回到欄位 |
| Escape | 多值時,在膠囊標籤上:回到欄位 |
#無障礙
- 輸入欄位具有
role="combobox"、指向清單方塊的aria-controls,以及aria-autocomplete="list"和aria-expanded。 - 焦點留在輸入欄位內,輔助技術透過
aria-activedescendant讀出作用中選項。 - 使用
tabindex="-1"將切換按鈕移出 Tab 鍵的巡覽順序,因為在欄位中就能按方向鍵開啟清單。 - 設定
autocomplete="off",避免瀏覽器內建的自動完成建議遮住清單方塊。
#React、Svelte 和 Vue
combobox 元件會根據選項清單產生這套標記、掛上行為,並支援傳入及傳出選取值。設定 multiple 時,元件會根據值寫入膠囊標籤,此時值是一個清單。帶有 group 的選項會寫在該群組的標題下,放在帶有 role="group" 的 listbox-group 中,並以其 listbox-label 作為標籤;群組中的選項全部被篩選掉時,群組也會一併隱藏。除了值之外,元件也會傳遞查詢文字:React 中為 query 和 onQueryChange,Svelte 中為可繫結的 query 搭配 onQueryChange,Vue 中為 v-model:query。查詢文字會在讀者輸入時傳出,選定後也會在值之後傳出;由擁有者傳入的查詢文字會寫入欄位並篩選選項。用 npx master-ui add combobox 將元件複製到專案中。元件的建置與使用方式請參閱 React、Svelte 和 Vue。
#類別
| 類別 | 說明 |
|---|---|
combobox | 將清單方塊錨定在欄位旁的外層容器 |
combobox-toggle | 位於欄位尾端的按鈕,內含箭頭圖示,用來展開或收合清單 |
搭配 input-group、input-group-field 和帶有 popover 屬性的 listbox 使用。
#相關元件
組合方塊由下列元件組成,各元件保有自己的類別與狀態。
- 輸入欄位採內凹樣式的文字欄位,支援標籤、提示、錯誤訊息與群組。
- 清單方塊供使用者選擇的清單,也是組合方塊與指令面板展開時顯示的介面。
- 標籤輸入將輸入的文字轉成值的欄位,每個值都以膠囊標籤顯示在凹槽內。
- 下拉選單原生下拉選單,選項清單採用與介面一致的樣式。