summaryrefslogtreecommitdiffstats
path: root/docs/html/design/building-blocks/switches.jd
blob: 9dd09caac84b846c9bf143616af56e523a56ef43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
page.title=Switches
page.tags=switch,checkbox,radiobutton,button
@jd:body

<a class="notice-designers-material"
  href="http://www.google.com/design/spec/components/selection-controls.html">
  <div>
    <h3>Material Design</h3>
    <p>Selection Controls<p>
  </div>
</a>

<p>Switches allow the user to select options. There are three kinds of switches: checkboxes, radio
buttons, and on/off switches.</p>



<h2 id="checkboxes">Checkboxes</h2>

<a class="notice-developers" href="{@docRoot}guide/topics/ui/controls/checkbox.html">
  <div>
    <h3>Developer Docs</h3>
    <p>Checkboxes</p>
  </div>
</a>

<p itemprop="description">Checkboxes allow the user to select multiple options from a set. Avoid using a single checkbox to
turn an option off or on. Instead, use an on/off switch.</p>

  <img src="{@docRoot}design/media/switches_checkboxes.png">



<h2 id="radio-buttons">Radio Buttons</h2>

<a class="notice-developers" href="{@docRoot}guide/topics/ui/controls/radiobutton.html">
  <div>
    <h3>Developer Docs</h3>
    <p>Radio Buttons</p>
  </div>
</a>

<p>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 spinner, which uses less space.</p>

  <img src="{@docRoot}design/media/switches_radios.png">



<h2 id="switches">On/off Switches</h2>

<a class="notice-developers" href="{@docRoot}guide/topics/ui/controls/togglebutton.html">
  <div>
    <h3>Developer Docs</h3>
    <p>Toggle Buttons</p>
  </div>
</a>

<p>On/off switches toggle the state of a single settings option.</p>

  <img src="{@docRoot}design/media/switches_switches.png">