Material design - Components– Selection controls

Selection controls - 選擇控件

Selection controls allow the user to select options.

【翻譯】
選擇控件允許用戶選擇選項(xiàng)埃碱。

Three types of selection controls are covered in this guidance:

Checkboxes allow the selection of multiple options from a set.
Radio buttons allow the selection of a single option from a set.
Switches allow a selection to be turned on or off.

【翻譯】
本指南包括三種類型的選擇控制:
復(fù)選框允許從一組中選擇多個(gè)選項(xiàng)藤巢。
單選按鈕允許從一個(gè)集合中選擇單個(gè)選項(xiàng)蛇损。
開關(guān)允許選擇打開或關(guān)閉逊移。

Color - 顏色
Selection controls use an app’s accent color.

【翻譯】
選擇控件使用應(yīng)用的強(qiáng)調(diào)顏色芙沥。

Themes - 主題
Selection controls are available in both dark and light themes.

【翻譯】
選擇控件可用于暗和亮主題车遂。

Checkbox - 復(fù)選框

Checkboxes allow the user to select multiple options from a set.

If you have multiple options appearing in a list, you can preserve space by using checkboxes instead of on/off switches.

If you have a single option, avoid using a checkbox and use an on/off switch instead.

【翻譯】
復(fù)選框允許用戶從集合中選擇多個(gè)選項(xiàng)。
如果列表中有多個(gè)選項(xiàng)填具,您可以使用復(fù)選框而不是開/關(guān)開關(guān)來保留空間统舀。
如果您有單個(gè)選項(xiàng)匆骗,請(qǐng)避免使用復(fù)選框劳景,而使用開/關(guān)開關(guān)誉简。

[圖片上傳失敗...(image-ad7a98-1552294680602)]
Light theme

【翻譯】
亮色主題

[圖片上傳失敗...(image-caf6fd-1552294680602)]
Dark theme

【翻譯】
暗色主題

Light - 亮色

On: Swatch 500, Opacity 100%
Off: #000000, Opacity 54%
Disabled: #000000, Opacity 26%

【翻譯】
開:色板 500,不透明度100%
關(guān)閉:#000000盟广,不透明度54%
禁用:#000000闷串,不透明度26%

image

Light theme for checkboxes in hover, focused, pressed, disabled, and disabled focused states.

【翻譯】
淺色主題的懸停,聚焦筋量,按下烹吵,禁用和禁用焦點(diǎn)狀態(tài)的復(fù)選框。

Dark - 暗色

On: Swatch 500, Opacity 100%
Off: #FFFFFF, Opacity 70%
Disabled: #FFFFFF, Opacity 30%

【翻譯】
開:色板 500桨武,不透明度100%
關(guān)閉:#FFFFFF肋拔,不透明度70%
已禁用:#FFFFFF,不透明度30%

[圖片上傳失敗...(image-2eb60e-1552294680602)]
Dark theme for checkboxes in hover, focused, pressed, disabled, and disabled focused states.

【翻譯】
黑色主題的懸停呀酸,聚焦凉蜂,按下,禁用和禁用焦點(diǎn)狀態(tài)的復(fù)選框性誉。

Radio button - 單選按鈕

Radio buttons allow the user to select one option from a set. Use radio buttons for exclusive selection if you think that the user needs to see all available options side-by-side.

Otherwise, consider a dropdown, which uses less space than displaying all options.

【翻譯】
單選按鈕允許用戶從一組中選擇一個(gè)選項(xiàng)窿吩。如果您認(rèn)為用戶需要并排查看所有可用的選項(xiàng),請(qǐng)使用單選按鈕進(jìn)行獨(dú)占選擇错览。
否則纫雁,請(qǐng)考慮一個(gè)下拉列表,其使用的空間比顯示所有選項(xiàng)少倾哺。

[圖片上傳失敗...(image-adb506-1552294680602)]
Light theme for radio buttons

【翻譯】
亮色主題的單選按鈕

[圖片上傳失敗...(image-50b1b9-1552294680602)]
Dark theme for radio buttons

【翻譯】
暗色主題的單選按鈕

Light - 亮色

On: Swatch 500, Opacity 100%
Off: #000000, Opacity 54%
Disabled: #000000, Opacity 26%

【翻譯】
開:色板 500轧邪,不透明度100%
關(guān)閉:#000000,不透明度54%
禁用:#000000羞海,不透明度26%

[圖片上傳失敗...(image-500735-1552294680602)]
Light theme for radio buttons in hover, focused, pressed, disabled, and disabled focused states.

【翻譯】
輕松主題的單選按鈕懸停闲勺,聚焦,按下扣猫,禁用和禁用焦點(diǎn)狀態(tài)菜循。

Dark - 暗色

On: Swatch 500, Opacity 100%
Off: #FFFFFF, Opacity 70%
Disabled: #FFFFFF, Opacity 30%

【翻譯】
開:色板 500,不透明度100%
關(guān)閉:#FFFFFF申尤,不透明度70%
已禁用:#FFFFFF癌幕,不透明度30%

[圖片上傳失敗...(image-70e202-1552294680602)]
Dark theme for radio buttons in hover, focused, pressed, disabled, and disabled focused states.

【翻譯】
黑色主題的單選按鈕懸停,聚焦昧穿,按下勺远,禁用和禁用焦點(diǎn)狀態(tài)。

Switch - 開關(guān)

On/off switches toggle the state of a single settings option. The option that the switch controls, as well as the state it’s in, should be made clear from the corresponding inline label. Switches take on the same visual properties of the radio button.

The on/off slide toggle with the text “on” and “off” included within the asset is deprecated. Use the switch shown here instead.

【翻譯】
開/關(guān)開關(guān)可切換單個(gè)設(shè)置選項(xiàng)的狀態(tài)时鸵。 開關(guān)控制的選項(xiàng)以及它所處的狀態(tài)應(yīng)該從相應(yīng)的內(nèi)聯(lián)標(biāo)簽中清除胶逢。 開關(guān)采用單選按鈕的相同視覺屬性厅瞎。 不推薦使用包含在資產(chǎn)中的文字“開”和“關(guān)”的開/關(guān)幻燈片切換。 使用此處顯示的開關(guān)初坠。

[圖片上傳失敗...(image-14d8e8-1552294680602)]
Light theme

【翻譯】
亮色主題

[圖片上傳失敗...(image-4c9e60-1552294680602)]
Dark theme

【翻譯】
暗色主題

Light - 亮色

Thumb On: Swatch 500, Opacity 100%
Track On: Swatch 500, Opacity 50%

Thumb Off: Grey 50, #FAFAFA, Opacity 100%
Track Off: #000000, Opacity 38%

Thumb Disabled: Grey 400, #BDBDBD, Opacity 100%
Track Disabled: #000000, Opacity 12%

【翻譯】
開關(guān)開:色板 500和簸,不透明度100%
軌道開:色板 500,不透明度50%
開關(guān)關(guān):灰色50碟刺,#FAFAFA锁保,不透明度100%

軌道關(guān):#000000,不透明度38%
開關(guān)禁用:灰色400半沽,#BDBDBD爽柒,不透明度100%
軌道已禁用:#000000,不透明度12%

[圖片上傳失敗...(image-cfc01d-1552294680602)]
Light theme for switches in hover, focused, pressed, disabled, and disabled focused states.

【翻譯】
輕松主題的開關(guān)在懸停者填,聚焦浩村,按下,禁用和禁用焦點(diǎn)狀態(tài)占哟。

Dark - 暗色

Thumb On: Swatch 200, Opacity 100%
Track On: Swatch 200, Opacity 50%

Thumb Off: Grey 400, #BDBDBD, Opacity 100%
Track Off: #FFFFFF, Opacity 30%

Thumb Disabled: Grey 800, #424242, Opacity 100%

Track Disabled: #FFFFFF, Opacity 10%

【翻譯】
開關(guān)開:Swatch 200心墅,不透明度100%
軌道開:Swatch 200,不透明度50%
開關(guān)關(guān):灰色400重挑,#BDBDBD嗓化,不透明度100%
軌道關(guān):#FFFFFF,不透明度30%
開關(guān)禁用:灰色800谬哀,#424242刺覆,不透明度100%
軌道禁用:#FFFFFF,不透明度10%

image

Dark theme for switches in hover, focused, pressed, disabled, and disabled focused states.

【翻譯】
黑暗主題為開關(guān)在懸停史煎,聚焦谦屑,按下,禁用和禁用聚焦?fàn)顟B(tài)篇梭。

Use the outer radial reaction only on form factors that favor finger touch, where interaction may obstruct the element completely. For desktop usage with a mouse, you do not need this extra indication.

【翻譯】
使用外徑向反應(yīng)只有在有利于手指觸摸的形狀因素氢橙,其中相互作用可能完全阻礙元素。對(duì)于使用鼠標(biāo)的桌面恬偷,您不需要此額外的指示悍手。

[圖片上傳失敗...(image-b27b1b-1552294680602)]
Radial reaction on mobile

【翻譯】
在移動(dòng)上的徑向反應(yīng)

[圖片上傳失敗...(image-92228f-1552294680602)]
No radial reaction on desktop

【翻譯】
桌面上沒有徑向反應(yīng)

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市袍患,隨后出現(xiàn)的幾起案子坦康,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 218,941評(píng)論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異飘庄,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)抄伍,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,397評(píng)論 3 395
  • 文/潘曉璐 我一進(jìn)店門先慷,熙熙樓的掌柜王于貴愁眉苦臉地迎上來时肿,“玉大人淆游,你說我怎么就攤上這事夭谤」啄粒” “怎么了?”我有些...
    開封第一講書人閱讀 165,345評(píng)論 0 356
  • 文/不壞的土叔 我叫張陵沮翔,是天一觀的道長陨帆。 經(jīng)常有香客問我曲秉,道長采蚀,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,851評(píng)論 1 295
  • 正文 為了忘掉前任承二,我火速辦了婚禮榆鼠,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘亥鸠。我一直安慰自己妆够,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,868評(píng)論 6 392
  • 文/花漫 我一把揭開白布负蚊。 她就那樣靜靜地躺著神妹,像睡著了一般。 火紅的嫁衣襯著肌膚如雪家妆。 梳的紋絲不亂的頭發(fā)上鸵荠,一...
    開封第一講書人閱讀 51,688評(píng)論 1 305
  • 那天,我揣著相機(jī)與錄音伤极,去河邊找鬼蛹找。 笑死,一個(gè)胖子當(dāng)著我的面吹牛哨坪,可吹牛的內(nèi)容都是我干的庸疾。 我是一名探鬼主播,決...
    沈念sama閱讀 40,414評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼当编,長吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼届慈!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起忿偷,我...
    開封第一講書人閱讀 39,319評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤金顿,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后牵舱,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體串绩,經(jīng)...
    沈念sama閱讀 45,775評(píng)論 1 315
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,945評(píng)論 3 336
  • 正文 我和宋清朗相戀三年芜壁,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了礁凡。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片高氮。...
    茶點(diǎn)故事閱讀 40,096評(píng)論 1 350
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖顷牌,靈堂內(nèi)的尸體忽然破棺而出剪芍,到底是詐尸還是另有隱情,我是刑警寧澤窟蓝,帶...
    沈念sama閱讀 35,789評(píng)論 5 346
  • 正文 年R本政府宣布罪裹,位于F島的核電站,受9級(jí)特大地震影響运挫,放射性物質(zhì)發(fā)生泄漏状共。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,437評(píng)論 3 331
  • 文/蒙蒙 一谁帕、第九天 我趴在偏房一處隱蔽的房頂上張望峡继。 院中可真熱鬧,春花似錦匈挖、人聲如沸碾牌。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,993評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽舶吗。三九已至,卻和暖如春择膝,著一層夾襖步出監(jiān)牢的瞬間誓琼,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,107評(píng)論 1 271
  • 我被黑心中介騙來泰國打工调榄, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留踊赠,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 48,308評(píng)論 3 372
  • 正文 我出身青樓每庆,卻偏偏與公主長得像筐带,于是被迫代替她去往敵國和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子缤灵,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,037評(píng)論 2 355

推薦閱讀更多精彩內(nèi)容