You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1549 lines
63 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. ---
  2. layout : 'default'
  3. css : 'dropdown'
  4. title : 'Dropdown'
  5. description : 'A dropdown allows a user to select a value from a series of options'
  6. type : 'UI Module'
  7. element : 'dropdown'
  8. elementType : 'module'
  9. themes : ['Default']
  10. ---
  11. <link rel="stylesheet/less" type="text/css" href="/build/less/definitions/modules/dropdown.less" />
  12. <script src="/javascript/dropdown.js"></script>
  13. <%- @partial('header', { tabs: 'module' }) %>
  14. <div class="main container">
  15. <div class="ui active tab" data-tab="definition">
  16. <h2 class="ui dividing header">Types</h2>
  17. <div class="dropdown example">
  18. <h4 class="ui header">Dropdown</h4>
  19. <p>A dropdown</p>
  20. <div class="ui dropdown">
  21. <div class="text">Shop</div>
  22. <i class="dropdown icon"></i>
  23. <div class="menu">
  24. <div class="header">Categories</div>
  25. <div class="item">Clothing</div>
  26. <div class="item">Home Goods</div>
  27. <div class="item">Bedroom</div>
  28. <div class="divider"></div>
  29. <div class="header">Order</div>
  30. <div class="item">Status</div>
  31. <div class="item">Cancellations</div>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="dropdown example">
  36. <h4 class="ui header">Selection</h4>
  37. <p>A dropdown can be used to select between choices in a form</p>
  38. <div class="ui selection dropdown">
  39. <input type="hidden" name="gender">
  40. <div class="default text">Gender</div>
  41. <i class="dropdown icon"></i>
  42. <div class="menu">
  43. <div class="item" data-value="1">Male</div>
  44. <div class="item" data-value="0">Female</div>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="another dropdown example">
  49. <div class="ui ignored info message">
  50. <div class="header">Converting Select Elements</div>
  51. <p>You can initialize a selection dropdown directly on a select element, any option that is given a blank value will automatically be converted into a placeholder</p>
  52. <p>Keep in mind however, if you initialize a dropdown directly on a select element, the dropdown contents will be hidden until javascript can render the element, causing a flash of unstyled content.</p>
  53. </div>
  54. <select class="ui dropdown">
  55. <option value="">Gender</option>
  56. <option value="1">Male</option>
  57. <option value="0">Female</option>
  58. </select>
  59. <div class="existing code">
  60. <select class="ui dropdown">
  61. <option value="">Gender</option>
  62. <option value="1">Male</option>
  63. <option value="0">Female</option>
  64. </select>
  65. </div>
  66. </div>
  67. <div class="dropdown example">
  68. <h4 class="ui header">Search Selection</h4>
  69. <p>A selection dropdown can allow a user to search through a large list of choices.</p>
  70. <div class="ui fluid search selection dropdown">
  71. <input type="hidden" name="country">
  72. <i class="dropdown icon"></i>
  73. <div class="default text">Select Country</div>
  74. <div class="menu">
  75. <div class="item" data-value="ad"><i class="ad flag"></i>Andorra</div>
  76. <div class="item" data-value="ae"><i class="ae flag"></i>United Arab Emirates</div>
  77. <div class="item" data-value="af"><i class="af flag"></i>Afghanistan</div>
  78. <div class="item" data-value="ag"><i class="ag flag"></i>Antigua</div>
  79. <div class="item" data-value="ai"><i class="ai flag"></i>Anguilla</div>
  80. <div class="item" data-value="al"><i class="al flag"></i>Albania</div>
  81. <div class="item" data-value="am"><i class="am flag"></i>Armenia</div>
  82. <div class="item" data-value="an"><i class="an flag"></i>Netherlands Antilles</div>
  83. <div class="item" data-value="ao"><i class="ao flag"></i>Angola</div>
  84. <div class="item" data-value="ar"><i class="ar flag"></i>Argentina</div>
  85. <div class="item" data-value="as"><i class="as flag"></i>American Samoa</div>
  86. <div class="item" data-value="at"><i class="at flag"></i>Austria</div>
  87. <div class="item" data-value="au"><i class="au flag"></i>Australia</div>
  88. <div class="item" data-value="aw"><i class="aw flag"></i>Aruba</div>
  89. <div class="item" data-value="ax"><i class="ax flag"></i>Aland Islands</div>
  90. <div class="item" data-value="az"><i class="az flag"></i>Azerbaijan</div>
  91. <div class="item" data-value="ba"><i class="ba flag"></i>Bosnia</div>
  92. <div class="item" data-value="bb"><i class="bb flag"></i>Barbados</div>
  93. <div class="item" data-value="bd"><i class="bd flag"></i>Bangladesh</div>
  94. <div class="item" data-value="be"><i class="be flag"></i>Belgium</div>
  95. <div class="item" data-value="bf"><i class="bf flag"></i>Burkina Faso</div>
  96. <div class="item" data-value="bg"><i class="bg flag"></i>Bulgaria</div>
  97. <div class="item" data-value="bh"><i class="bh flag"></i>Bahrain</div>
  98. <div class="item" data-value="bi"><i class="bi flag"></i>Burundi</div>
  99. <div class="item" data-value="bj"><i class="bj flag"></i>Benin</div>
  100. <div class="item" data-value="bm"><i class="bm flag"></i>Bermuda</div>
  101. <div class="item" data-value="bn"><i class="bn flag"></i>Brunei</div>
  102. <div class="item" data-value="bo"><i class="bo flag"></i>Bolivia</div>
  103. <div class="item" data-value="br"><i class="br flag"></i>Brazil</div>
  104. <div class="item" data-value="bs"><i class="bs flag"></i>Bahamas</div>
  105. <div class="item" data-value="bt"><i class="bt flag"></i>Bhutan</div>
  106. <div class="item" data-value="bv"><i class="bv flag"></i>Bouvet Island</div>
  107. <div class="item" data-value="bw"><i class="bw flag"></i>Botswana</div>
  108. <div class="item" data-value="by"><i class="by flag"></i>Belarus</div>
  109. <div class="item" data-value="bz"><i class="bz flag"></i>Belize</div>
  110. <div class="item" data-value="ca"><i class="ca flag"></i>Canada</div>
  111. <div class="item" data-value="cc"><i class="cc flag"></i>Cocos Islands</div>
  112. <div class="item" data-value="cd"><i class="cd flag"></i>Congo</div>
  113. <div class="item" data-value="cf"><i class="cf flag"></i>Central African Republic</div>
  114. <div class="item" data-value="cg"><i class="cg flag"></i>Congo Brazzaville</div>
  115. <div class="item" data-value="ch"><i class="ch flag"></i>Switzerland</div>
  116. <div class="item" data-value="ci"><i class="ci flag"></i>Cote Divoire</div>
  117. <div class="item" data-value="ck"><i class="ck flag"></i>Cook Islands</div>
  118. <div class="item" data-value="cl"><i class="cl flag"></i>Chile</div>
  119. <div class="item" data-value="cm"><i class="cm flag"></i>Cameroon</div>
  120. <div class="item" data-value="cn"><i class="cn flag"></i>China</div>
  121. <div class="item" data-value="co"><i class="co flag"></i>Colombia</div>
  122. <div class="item" data-value="cr"><i class="cr flag"></i>Costa Rica</div>
  123. <div class="item" data-value="cs"><i class="cs flag"></i>Serbia</div>
  124. <div class="item" data-value="cu"><i class="cu flag"></i>Cuba</div>
  125. <div class="item" data-value="cv"><i class="cv flag"></i>Cape Verde</div>
  126. <div class="item" data-value="cx"><i class="cx flag"></i>Christmas Island</div>
  127. <div class="item" data-value="cy"><i class="cy flag"></i>Cyprus</div>
  128. <div class="item" data-value="cz"><i class="cz flag"></i>Czech Republic</div>
  129. <div class="item" data-value="de"><i class="de flag"></i>Germany</div>
  130. <div class="item" data-value="dj"><i class="dj flag"></i>Djibouti</div>
  131. <div class="item" data-value="dk"><i class="dk flag"></i>Denmark</div>
  132. <div class="item" data-value="dm"><i class="dm flag"></i>Dominica</div>
  133. <div class="item" data-value="do"><i class="do flag"></i>Dominican Republic</div>
  134. <div class="item" data-value="dz"><i class="dz flag"></i>Algeria</div>
  135. <div class="item" data-value="ec"><i class="ec flag"></i>Ecuador</div>
  136. <div class="item" data-value="ee"><i class="ee flag"></i>Estonia</div>
  137. <div class="item" data-value="eg"><i class="eg flag"></i>Egypt</div>
  138. <div class="item" data-value="eh"><i class="eh flag"></i>Western Sahara</div>
  139. <div class="item" data-value="er"><i class="er flag"></i>Eritrea</div>
  140. <div class="item" data-value="es"><i class="es flag"></i>Spain</div>
  141. <div class="item" data-value="et"><i class="et flag"></i>Ethiopia</div>
  142. <div class="item" data-value="eu"><i class="eu flag"></i>European Union</div>
  143. <div class="item" data-value="fi"><i class="fi flag"></i>Finland</div>
  144. <div class="item" data-value="fj"><i class="fj flag"></i>Fiji</div>
  145. <div class="item" data-value="fk"><i class="fk flag"></i>Falkland Islands</div>
  146. <div class="item" data-value="fm"><i class="fm flag"></i>Micronesia</div>
  147. <div class="item" data-value="fo"><i class="fo flag"></i>Faroe Islands</div>
  148. <div class="item" data-value="fr"><i class="fr flag"></i>France</div>
  149. <div class="item" data-value="ga"><i class="ga flag"></i>Gabon</div>
  150. <div class="item" data-value="gb"><i class="gb flag"></i>England</div>
  151. <div class="item" data-value="gd"><i class="gd flag"></i>Grenada</div>
  152. <div class="item" data-value="ge"><i class="ge flag"></i>Georgia</div>
  153. <div class="item" data-value="gf"><i class="gf flag"></i>French Guiana</div>
  154. <div class="item" data-value="gh"><i class="gh flag"></i>Ghana</div>
  155. <div class="item" data-value="gi"><i class="gi flag"></i>Gibraltar</div>
  156. <div class="item" data-value="gl"><i class="gl flag"></i>Greenland</div>
  157. <div class="item" data-value="gm"><i class="gm flag"></i>Gambia</div>
  158. <div class="item" data-value="gn"><i class="gn flag"></i>Guinea</div>
  159. <div class="item" data-value="gp"><i class="gp flag"></i>Guadeloupe</div>
  160. <div class="item" data-value="gq"><i class="gq flag"></i>Equatorial Guinea</div>
  161. <div class="item" data-value="gr"><i class="gr flag"></i>Greece</div>
  162. <div class="item" data-value="gs"><i class="gs flag"></i>Sandwich Islands</div>
  163. <div class="item" data-value="gt"><i class="gt flag"></i>Guatemala</div>
  164. <div class="item" data-value="gu"><i class="gu flag"></i>Guam</div>
  165. <div class="item" data-value="gw"><i class="gw flag"></i>Guinea-Bissau</div>
  166. <div class="item" data-value="gy"><i class="gy flag"></i>Guyana</div>
  167. <div class="item" data-value="hk"><i class="hk flag"></i>Hong Kong</div>
  168. <div class="item" data-value="hm"><i class="hm flag"></i>Heard Island</div>
  169. <div class="item" data-value="hn"><i class="hn flag"></i>Honduras</div>
  170. <div class="item" data-value="hr"><i class="hr flag"></i>Croatia</div>
  171. <div class="item" data-value="ht"><i class="ht flag"></i>Haiti</div>
  172. <div class="item" data-value="hu"><i class="hu flag"></i>Hungary</div>
  173. <div class="item" data-value="id"><i class="id flag"></i>Indonesia</div>
  174. <div class="item" data-value="ie"><i class="ie flag"></i>Ireland</div>
  175. <div class="item" data-value="il"><i class="il flag"></i>Israel</div>
  176. <div class="item" data-value="in"><i class="in flag"></i>India</div>
  177. <div class="item" data-value="io"><i class="io flag"></i>Indian Ocean Territory</div>
  178. <div class="item" data-value="iq"><i class="iq flag"></i>Iraq</div>
  179. <div class="item" data-value="ir"><i class="ir flag"></i>Iran</div>
  180. <div class="item" data-value="is"><i class="is flag"></i>Iceland</div>
  181. <div class="item" data-value="it"><i class="it flag"></i>Italy</div>
  182. <div class="item" data-value="jm"><i class="jm flag"></i>Jamaica</div>
  183. <div class="item" data-value="jo"><i class="jo flag"></i>Jordan</div>
  184. <div class="item" data-value="jp"><i class="jp flag"></i>Japan</div>
  185. <div class="item" data-value="ke"><i class="ke flag"></i>Kenya</div>
  186. <div class="item" data-value="kg"><i class="kg flag"></i>Kyrgyzstan</div>
  187. <div class="item" data-value="kh"><i class="kh flag"></i>Cambodia</div>
  188. <div class="item" data-value="ki"><i class="ki flag"></i>Kiribati</div>
  189. <div class="item" data-value="km"><i class="km flag"></i>Comoros</div>
  190. <div class="item" data-value="kn"><i class="kn flag"></i>Saint Kitts and Nevis</div>
  191. <div class="item" data-value="kp"><i class="kp flag"></i>North Korea</div>
  192. <div class="item" data-value="kr"><i class="kr flag"></i>South Korea</div>
  193. <div class="item" data-value="kw"><i class="kw flag"></i>Kuwait</div>
  194. <div class="item" data-value="ky"><i class="ky flag"></i>Cayman Islands</div>
  195. <div class="item" data-value="kz"><i class="kz flag"></i>Kazakhstan</div>
  196. <div class="item" data-value="la"><i class="la flag"></i>Laos</div>
  197. <div class="item" data-value="lb"><i class="lb flag"></i>Lebanon</div>
  198. <div class="item" data-value="lc"><i class="lc flag"></i>Saint Lucia</div>
  199. <div class="item" data-value="li"><i class="li flag"></i>Liechtenstein</div>
  200. <div class="item" data-value="lk"><i class="lk flag"></i>Sri Lanka</div>
  201. <div class="item" data-value="lr"><i class="lr flag"></i>Liberia</div>
  202. <div class="item" data-value="ls"><i class="ls flag"></i>Lesotho</div>
  203. <div class="item" data-value="lt"><i class="lt flag"></i>Lithuania</div>
  204. <div class="item" data-value="lu"><i class="lu flag"></i>Luxembourg</div>
  205. <div class="item" data-value="lv"><i class="lv flag"></i>Latvia</div>
  206. <div class="item" data-value="ly"><i class="ly flag"></i>Libya</div>
  207. <div class="item" data-value="ma"><i class="ma flag"></i>Morocco</div>
  208. <div class="item" data-value="mc"><i class="mc flag"></i>Monaco</div>
  209. <div class="item" data-value="md"><i class="md flag"></i>Moldova</div>
  210. <div class="item" data-value="me"><i class="me flag"></i>Montenegro</div>
  211. <div class="item" data-value="mg"><i class="mg flag"></i>Madagascar</div>
  212. <div class="item" data-value="mh"><i class="mh flag"></i>Marshall Islands</div>
  213. <div class="item" data-value="mk"><i class="mk flag"></i>MacEdonia</div>
  214. <div class="item" data-value="ml"><i class="ml flag"></i>Mali</div>
  215. <div class="item" data-value="ar"><i class="ar flag"></i>Burma</div>
  216. <div class="item" data-value="mn"><i class="mn flag"></i>Mongolia</div>
  217. <div class="item" data-value="mo"><i class="mo flag"></i>MacAu</div>
  218. <div class="item" data-value="mp"><i class="mp flag"></i>Northern Mariana Islands</div>
  219. <div class="item" data-value="mq"><i class="mq flag"></i>Martinique</div>
  220. <div class="item" data-value="mr"><i class="mr flag"></i>Mauritania</div>
  221. <div class="item" data-value="ms"><i class="ms flag"></i>Montserrat</div>
  222. <div class="item" data-value="mt"><i class="mt flag"></i>Malta</div>
  223. <div class="item" data-value="mu"><i class="mu flag"></i>Mauritius</div>
  224. <div class="item" data-value="mv"><i class="mv flag"></i>Maldives</div>
  225. <div class="item" data-value="mw"><i class="mw flag"></i>Malawi</div>
  226. <div class="item" data-value="mx"><i class="mx flag"></i>Mexico</div>
  227. <div class="item" data-value="my"><i class="my flag"></i>Malaysia</div>
  228. <div class="item" data-value="mz"><i class="mz flag"></i>Mozambique</div>
  229. <div class="item" data-value="na"><i class="na flag"></i>Namibia</div>
  230. <div class="item" data-value="nc"><i class="nc flag"></i>New Caledonia</div>
  231. <div class="item" data-value="ne"><i class="ne flag"></i>Niger</div>
  232. <div class="item" data-value="nf"><i class="nf flag"></i>Norfolk Island</div>
  233. <div class="item" data-value="ng"><i class="ng flag"></i>Nigeria</div>
  234. <div class="item" data-value="ni"><i class="ni flag"></i>Nicaragua</div>
  235. <div class="item" data-value="nl"><i class="nl flag"></i>Netherlands</div>
  236. <div class="item" data-value="no"><i class="no flag"></i>Norway</div>
  237. <div class="item" data-value="np"><i class="np flag"></i>Nepal</div>
  238. <div class="item" data-value="nr"><i class="nr flag"></i>Nauru</div>
  239. <div class="item" data-value="nu"><i class="nu flag"></i>Niue</div>
  240. <div class="item" data-value="nz"><i class="nz flag"></i>New Zealand</div>
  241. <div class="item" data-value="om"><i class="om flag"></i>Oman</div>
  242. <div class="item" data-value="pa"><i class="pa flag"></i>Panama</div>
  243. <div class="item" data-value="pe"><i class="pe flag"></i>Peru</div>
  244. <div class="item" data-value="pf"><i class="pf flag"></i>French Polynesia</div>
  245. <div class="item" data-value="pg"><i class="pg flag"></i>New Guinea</div>
  246. <div class="item" data-value="ph"><i class="ph flag"></i>Philippines</div>
  247. <div class="item" data-value="pk"><i class="pk flag"></i>Pakistan</div>
  248. <div class="item" data-value="pl"><i class="pl flag"></i>Poland</div>
  249. <div class="item" data-value="pm"><i class="pm flag"></i>Saint Pierre</div>
  250. <div class="item" data-value="pn"><i class="pn flag"></i>Pitcairn Islands</div>
  251. <div class="item" data-value="pr"><i class="pr flag"></i>Puerto Rico</div>
  252. <div class="item" data-value="ps"><i class="ps flag"></i>Palestine</div>
  253. <div class="item" data-value="pt"><i class="pt flag"></i>Portugal</div>
  254. <div class="item" data-value="pw"><i class="pw flag"></i>Palau</div>
  255. <div class="item" data-value="py"><i class="py flag"></i>Paraguay</div>
  256. <div class="item" data-value="qa"><i class="qa flag"></i>Qatar</div>
  257. <div class="item" data-value="re"><i class="re flag"></i>Reunion</div>
  258. <div class="item" data-value="ro"><i class="ro flag"></i>Romania</div>
  259. <div class="item" data-value="rs"><i class="rs flag"></i>Serbia</div>
  260. <div class="item" data-value="ru"><i class="ru flag"></i>Russia</div>
  261. <div class="item" data-value="rw"><i class="rw flag"></i>Rwanda</div>
  262. <div class="item" data-value="sa"><i class="sa flag"></i>Saudi Arabia</div>
  263. <div class="item" data-value="sb"><i class="sb flag"></i>Solomon Islands</div>
  264. <div class="item" data-value="sc"><i class="sc flag"></i>Seychelles</div>
  265. <div class="item" data-value="sd"><i class="sd flag"></i>Sudan</div>
  266. <div class="item" data-value="se"><i class="se flag"></i>Sweden</div>
  267. <div class="item" data-value="sg"><i class="sg flag"></i>Singapore</div>
  268. <div class="item" data-value="sh"><i class="sh flag"></i>Saint Helena</div>
  269. <div class="item" data-value="si"><i class="si flag"></i>Slovenia</div>
  270. <div class="item" data-value="sj"><i class="sj flag"></i>Svalbard, I Flag Jan Mayen</div>
  271. <div class="item" data-value="sk"><i class="sk flag"></i>Slovakia</div>
  272. <div class="item" data-value="sl"><i class="sl flag"></i>Sierra Leone</div>
  273. <div class="item" data-value="sm"><i class="sm flag"></i>San Marino</div>
  274. <div class="item" data-value="sn"><i class="sn flag"></i>Senegal</div>
  275. <div class="item" data-value="so"><i class="so flag"></i>Somalia</div>
  276. <div class="item" data-value="sr"><i class="sr flag"></i>Suriname</div>
  277. <div class="item" data-value="st"><i class="st flag"></i>Sao Tome</div>
  278. <div class="item" data-value="sv"><i class="sv flag"></i>El Salvador</div>
  279. <div class="item" data-value="sy"><i class="sy flag"></i>Syria</div>
  280. <div class="item" data-value="sz"><i class="sz flag"></i>Swaziland</div>
  281. <div class="item" data-value="tc"><i class="tc flag"></i>Caicos Islands</div>
  282. <div class="item" data-value="td"><i class="td flag"></i>Chad</div>
  283. <div class="item" data-value="tf"><i class="tf flag"></i>French Territories</div>
  284. <div class="item" data-value="tg"><i class="tg flag"></i>Togo</div>
  285. <div class="item" data-value="th"><i class="th flag"></i>Thailand</div>
  286. <div class="item" data-value="tj"><i class="tj flag"></i>Tajikistan</div>
  287. <div class="item" data-value="tk"><i class="tk flag"></i>Tokelau</div>
  288. <div class="item" data-value="tl"><i class="tl flag"></i>Timorleste</div>
  289. <div class="item" data-value="tm"><i class="tm flag"></i>Turkmenistan</div>
  290. <div class="item" data-value="tn"><i class="tn flag"></i>Tunisia</div>
  291. <div class="item" data-value="to"><i class="to flag"></i>Tonga</div>
  292. <div class="item" data-value="tr"><i class="tr flag"></i>Turkey</div>
  293. <div class="item" data-value="tt"><i class="tt flag"></i>Trinidad</div>
  294. <div class="item" data-value="tv"><i class="tv flag"></i>Tuvalu</div>
  295. <div class="item" data-value="tw"><i class="tw flag"></i>Taiwan</div>
  296. <div class="item" data-value="tz"><i class="tz flag"></i>Tanzania</div>
  297. <div class="item" data-value="ua"><i class="ua flag"></i>Ukraine</div>
  298. <div class="item" data-value="ug"><i class="ug flag"></i>Uganda</div>
  299. <div class="item" data-value="um"><i class="um flag"></i>Us Minor Islands</div>
  300. <div class="item" data-value="us"><i class="us flag"></i>United States</div>
  301. <div class="item" data-value="uy"><i class="uy flag"></i>Uruguay</div>
  302. <div class="item" data-value="uz"><i class="uz flag"></i>Uzbekistan</div>
  303. <div class="item" data-value="va"><i class="va flag"></i>Vatican City</div>
  304. <div class="item" data-value="vc"><i class="vc flag"></i>Saint Vincent</div>
  305. <div class="item" data-value="ve"><i class="ve flag"></i>Venezuela</div>
  306. <div class="item" data-value="vg"><i class="vg flag"></i>British Virgin Islands</div>
  307. <div class="item" data-value="vi"><i class="vi flag"></i>Us Virgin Islands</div>
  308. <div class="item" data-value="vn"><i class="vn flag"></i>Vietnam</div>
  309. <div class="item" data-value="vu"><i class="vu flag"></i>Vanuatu</div>
  310. <div class="item" data-value="wf"><i class="wf flag"></i>Wallis and Futuna</div>
  311. <div class="item" data-value="ws"><i class="ws flag"></i>Samoa</div>
  312. <div class="item" data-value="ye"><i class="ye flag"></i>Yemen</div>
  313. <div class="item" data-value="yt"><i class="yt flag"></i>Mayotte</div>
  314. <div class="item" data-value="za"><i class="za flag"></i>South Africa</div>
  315. <div class="item" data-value="zm"><i class="zm flag"></i>Zambia</div>
  316. <div class="item" data-value="zw"><i class="zw flag"></i>Zimbabwe</div>
  317. </div>
  318. </div>
  319. <div class="existing code">
  320. <div class="ui fluid search selection dropdown">
  321. <input type="hidden" name="country">
  322. <i class="dropdown icon"></i>
  323. <div class="default text">Select Country</div>
  324. <div class="menu">
  325. <div class="item" data-value="ad"><i class="ad flag"></i>Andorra</div>
  326. <div class="item" data-value="ae"><i class="ae flag"></i>United Arab Emirates</div>
  327. <div class="item" data-value="af"><i class="af flag"></i>Afghanistan</div>
  328. <div class="item" data-value="ag"><i class="ag flag"></i>Antigua</div>
  329. <!-- Omitted Some Countries !-->
  330. <div class="item" data-value="zm"><i class="zm flag"></i>Zambia</div>
  331. <div class="item" data-value="zw"><i class="zw flag"></i>Zimbabwe</div>
  332. </div>
  333. </div>
  334. </div>
  335. </div>
  336. <div class="another dropdown example">
  337. <select class="ui search dropdown">
  338. <option value="">State</option>
  339. <option value="AL">Alabama</option>
  340. <option value="AL">Alabama</option>
  341. <option value="AK">Alaska</option>
  342. <option value="AZ">Arizona</option>
  343. <option value="AR">Arkansas</option>
  344. <option value="CA">California</option>
  345. <option value="CO">Colorado</option>
  346. <option value="CT">Connecticut</option>
  347. <option value="DE">Delaware</option>
  348. <option value="DC">District Of Columbia</option>
  349. <option value="FL">Florida</option>
  350. <option value="GA">Georgia</option>
  351. <option value="HI">Hawaii</option>
  352. <option value="ID">Idaho</option>
  353. <option value="IL">Illinois</option>
  354. <option value="IN">Indiana</option>
  355. <option value="IA">Iowa</option>
  356. <option value="KS">Kansas</option>
  357. <option value="KY">Kentucky</option>
  358. <option value="LA">Louisiana</option>
  359. <option value="ME">Maine</option>
  360. <option value="MD">Maryland</option>
  361. <option value="MA">Massachusetts</option>
  362. <option value="MI">Michigan</option>
  363. <option value="MN">Minnesota</option>
  364. <option value="MS">Mississippi</option>
  365. <option value="MO">Missouri</option>
  366. <option value="MT">Montana</option>
  367. <option value="NE">Nebraska</option>
  368. <option value="NV">Nevada</option>
  369. <option value="NH">New Hampshire</option>
  370. <option value="NJ">New Jersey</option>
  371. <option value="NM">New Mexico</option>
  372. <option value="NY">New York</option>
  373. <option value="NC">North Carolina</option>
  374. <option value="ND">North Dakota</option>
  375. <option value="OH">Ohio</option>
  376. <option value="OK">Oklahoma</option>
  377. <option value="OR">Oregon</option>
  378. <option value="PA">Pennsylvania</option>
  379. <option value="RI">Rhode Island</option>
  380. <option value="SC">South Carolina</option>
  381. <option value="SD">South Dakota</option>
  382. <option value="TN">Tennessee</option>
  383. <option value="TX">Texas</option>
  384. <option value="UT">Utah</option>
  385. <option value="VT">Vermont</option>
  386. <option value="VA">Virginia</option>
  387. <option value="WA">Washington</option>
  388. <option value="WV">West Virginia</option>
  389. <option value="WI">Wisconsin</option>
  390. <option value="WY">Wyoming</option>
  391. </select>
  392. <div class="existing code">
  393. <select class="ui search dropdown">
  394. <option value="">State</option>
  395. <option value="AL">Alabama</option>
  396. <option value="AL">Alabama</option>
  397. <option value="AK">Alaska</option>
  398. <!-- Omitted for brevity !-->
  399. <option value="WA">Washington</option>
  400. <option value="WV">West Virginia</option>
  401. <option value="WI">Wisconsin</option>
  402. <option value="WY">Wyoming</option>
  403. </select>
  404. </div>
  405. </div>
  406. <div class="dropdown example">
  407. <h4 class="ui header">Inline</h4>
  408. <p>A dropdown can be formatted to appear inline in other content</p>
  409. Show me posts trending
  410. <div class="ui inline dropdown">
  411. <div class="text">today</div>
  412. <i class="dropdown icon"></i>
  413. <div class="menu">
  414. <div class="item" data-text="today">Today</div>
  415. <div class="item" data-text="this week">This Week</div>
  416. <div class="item" data-text="this month">This Month</div>
  417. </div>
  418. </div>
  419. </div>
  420. <div class="hover example">
  421. <h4 class="ui header">Pointing</h4>
  422. <p>A dropdown can be formatted so that its menu is pointing</p>
  423. <div class="ui menu">
  424. <div class="menu">
  425. <a class="item">
  426. Home
  427. </a>
  428. <div class="ui pointing dropdown link item">
  429. <i class="dropdown icon"></i>
  430. Shopping
  431. <div class="menu">
  432. <div class="header">Categories</div>
  433. <div class="item">
  434. <i class="dropdown icon"></i>
  435. Clothing
  436. <div class="menu">
  437. <div class="header">Mens</div>
  438. <div class="item">Shirts</div>
  439. <div class="item">Pants</div>
  440. <div class="item">Jeans</div>
  441. <div class="item">Shoes</div>
  442. <div class="divider"></div>
  443. <div class="header">Womens</div>
  444. <div class="item">Dresses</div>
  445. <div class="item">Shoes</div>
  446. <div class="item">Bags</div>
  447. </div>
  448. </div>
  449. <div class="item">Home Goods</div>
  450. <div class="item">Bedroom</div>
  451. <div class="divider"></div>
  452. <div class="header">Order</div>
  453. <div class="item">Status</div>
  454. <div class="item">Cancellations</div>
  455. </div>
  456. </div>
  457. <a class="item">
  458. Forums
  459. </a>
  460. <a class="item">
  461. Contact Us
  462. </a>
  463. </div>
  464. </div>
  465. </div>
  466. <div class="another hover example">
  467. <div class="ui vertical menu">
  468. <div class="menu">
  469. <a class="item">
  470. Home
  471. </a>
  472. <div class="ui left pointing dropdown link item">
  473. <i class="dropdown icon"></i>
  474. Messages
  475. <div class="menu">
  476. <div class="item">Inbox</div>
  477. <div class="item">Starred</div>
  478. <div class="item">Sent Mail</div>
  479. <div class="item">Drafts (143)</div>
  480. <div class="divider"></div>
  481. <div class="item">Spam (1009)</div>
  482. <div class="item">Trash</div>
  483. </div>
  484. </div>
  485. <a class="item">
  486. Browse
  487. </a>
  488. <a class="item">
  489. Help
  490. </a>
  491. </div>
  492. </div>
  493. </div>
  494. <div class="another button example">
  495. <div class="ui icon top left pointing dropdown button">
  496. <i class="wrench icon"></i>
  497. <div class="menu">
  498. <div class="header">Display Density</div>
  499. <div class="item">Comfortable</div>
  500. <div class="item">Cozy</div>
  501. <div class="item">Compact</div>
  502. <div class="ui divider"></div>
  503. <div class="item">Settings</div>
  504. <div class="item">
  505. <i class="dropdown icon"></i>
  506. Upload Settings
  507. <div class="menu">
  508. <div class="item">
  509. <i class="check icon"></i>
  510. Convert Uploaded Files to PDF
  511. </div>
  512. <div class="item">
  513. <i class="check icon"></i>
  514. Digitize Text from Uploaded Files
  515. </div>
  516. </div>
  517. </div>
  518. <div class="item">Manage Apps</div>
  519. <div class="item">Keyboard Shortcuts</div>
  520. <div class="item">Help</div>
  521. </div>
  522. </div>
  523. </div>
  524. <div class="another button example">
  525. <div class="ui info message ignored">Bottom pointing dropdown menus have sub-menus open upwards</div>
  526. <div class="ui icon bottom left pointing dropdown button">
  527. <i class="wrench icon"></i>
  528. <div class="menu">
  529. <div class="item">
  530. <i class="dropdown icon"></i>
  531. New
  532. <div class="menu">
  533. <div class="item">Document</div>
  534. <div class="item">Image</div>
  535. </div>
  536. </div>
  537. <div class="item">Save</div>
  538. <div class="item">Edit</div>
  539. </div>
  540. </div>
  541. <div class="ui icon bottom right pointing dropdown button">
  542. <i class="wrench icon"></i>
  543. <div class="menu">
  544. <div class="item">
  545. <i class="dropdown icon"></i>
  546. New
  547. <div class="menu">
  548. <div class="item">Document</div>
  549. <div class="item">Image</div>
  550. </div>
  551. </div>
  552. <div class="item">Save</div>
  553. <div class="item">Edit</div>
  554. </div>
  555. </div>
  556. </div>
  557. <div class="another button example">
  558. <div class="ui labeled icon top right pointing dropdown button">
  559. <i class="filter icon"></i>
  560. <span class="text">Filter Posts</span>
  561. <div class="menu">
  562. <div class="ui icon input">
  563. <i class="search icon"></i>
  564. <input type="text" name="search" placeholder="Search issues...">
  565. </div>
  566. <div class="divider"></div>
  567. <div class="header">
  568. <i class="tags icon"></i>
  569. Filter by tag
  570. </div>
  571. <div class="item">
  572. <div class="ui red empty circular label"></div>
  573. Important
  574. </div>
  575. <div class="item">
  576. <div class="ui blue empty circular label"></div>
  577. Announcement
  578. </div>
  579. <div class="item">
  580. <div class="ui black empty circular label"></div>
  581. Discussion
  582. </div>
  583. <div class="divider"></div>
  584. <div class="header">
  585. <i class="calendar icon"></i>
  586. Filter by date
  587. </div>
  588. <div class="item">
  589. <i class="circle icon"></i>
  590. This Week
  591. </div>
  592. <div class="item">
  593. <i class="circle icon"></i>
  594. This Month
  595. </div>
  596. <div class="item">
  597. <i class="circle icon"></i>
  598. This Year
  599. </div>
  600. </div>
  601. </div>
  602. </div>
  603. <div class="another button example">
  604. <div class="ui right pointing dropdown icon button">
  605. <i class="settings icon"></i>
  606. <div class="menu">
  607. <div class="ui transparent left icon input">
  608. <i class="search icon"></i>
  609. <input type="text" name="search" placeholder="Search issues...">
  610. </div>
  611. <div class="divider"></div>
  612. <div class="header">
  613. <i class="tags icon"></i>
  614. Filter by tag
  615. </div>
  616. <div class="item">
  617. <div class="ui red empty circular label"></div>
  618. Important
  619. </div>
  620. <div class="item">
  621. <div class="ui blue empty circular label"></div>
  622. Announcement
  623. </div>
  624. <div class="item">
  625. <div class="ui black empty circular label"></div>
  626. Discussion
  627. </div>
  628. </div>
  629. </div>
  630. <div class="ui left pointing dropdown icon button">
  631. <i class="settings icon"></i>
  632. <div class="menu">
  633. <div class="ui transparent left icon input">
  634. <i class="search icon"></i>
  635. <input type="text" name="search" placeholder="Search issues...">
  636. </div>
  637. <div class="divider"></div>
  638. <div class="header">
  639. <i class="tags icon"></i>
  640. Filter by tag
  641. </div>
  642. <div class="item">
  643. <div class="ui red empty circular label"></div>
  644. Important
  645. </div>
  646. <div class="item">
  647. <div class="ui blue empty circular label"></div>
  648. Announcement
  649. </div>
  650. <div class="item">
  651. <div class="ui black empty circular label"></div>
  652. Discussion
  653. </div>
  654. </div>
  655. </div>
  656. </div>
  657. <div class="button example">
  658. <h4 class="ui header">Floating</h4>
  659. <p>A dropdown menu can appear to be floating below an element.</p>
  660. <div class="ui teal buttons">
  661. <div class="ui button">Save</div>
  662. <div class="ui floating dropdown icon button">
  663. <i class="dropdown icon"></i>
  664. <div class="menu">
  665. <div class="item"><i class="edit icon"></i> Edit Post</div>
  666. <div class="item"><i class="delete icon"></i> Remove Post</div>
  667. <div class="item"><i class="hide icon"></i> Hide Post</div>
  668. </div>
  669. </div>
  670. </div>
  671. </div>
  672. <div class="example">
  673. <h4 class="ui header">Simple</h4>
  674. <p>A simple dropdown can open without javascript</p>
  675. <div class="ui compact menu">
  676. <div class="ui simple dropdown item">
  677. <i class="dropdown icon"></i>
  678. Dropdown
  679. <div class="menu">
  680. <div class="item">Choice 1</div>
  681. <div class="item">Choice 2</div>
  682. <div class="item">Choice 3</div>
  683. </div>
  684. </div>
  685. </div>
  686. </div>
  687. <h2 class="ui dividing header">Content</h2>
  688. <div class="dropdown example">
  689. <h4 class="ui header">Header</h4>
  690. <p>A dropdown can contain a header</p>
  691. <div class="ui floating labeled icon dropdown button">
  692. <i class="filter icon"></i>
  693. <span class="text">Filter</span>
  694. <div class="menu">
  695. <div class="header">
  696. <i class="tags icon"></i>
  697. Filter by tag
  698. </div>
  699. <div class="item">
  700. Important
  701. </div>
  702. <div class="item">
  703. Announcement
  704. </div>
  705. <div class="item">
  706. Discussion
  707. </div>
  708. </div>
  709. </div>
  710. </div>
  711. <div class="dropdown example">
  712. <h4 class="ui header">Divider</h4>
  713. <p>A dropdown can contain dividers to separate related content</p>
  714. <div class="ui floating labeled icon dropdown button">
  715. <i class="filter icon"></i>
  716. <span class="text">Filter</span>
  717. <div class="menu">
  718. <div class="header">
  719. <i class="tags icon"></i>
  720. Filter by tag
  721. </div>
  722. <div class="divider"></div>
  723. <div class="item">
  724. Important
  725. </div>
  726. <div class="item">
  727. Announcement
  728. </div>
  729. <div class="item">
  730. Discussion
  731. </div>
  732. </div>
  733. </div>
  734. </div>
  735. <div class="dropdown example">
  736. <h4 class="ui header">Label</h4>
  737. <p>A dropdown can contain a <a href="/elements/input.html">ui label</a>.</p>
  738. <div class="ui floating labeled icon dropdown button">
  739. <i class="filter icon"></i>
  740. <span class="text">Filter</span>
  741. <div class="menu">
  742. <div class="header">
  743. Search Issues
  744. </div>
  745. <div class="ui left icon input">
  746. <i class="search icon"></i>
  747. <input type="text" name="search" placeholder="Search...">
  748. </div>
  749. <div class="header">
  750. <i class="tags icon"></i>
  751. Filter by tag
  752. </div>
  753. <div class="divider"></div>
  754. <div class="item">
  755. <div class="ui red empty circular label"></div>
  756. Important
  757. </div>
  758. <div class="item">
  759. <div class="ui blue empty circular label"></div>
  760. Announcement
  761. </div>
  762. <div class="item">
  763. <div class="ui black empty circular label"></div>
  764. Discussion
  765. </div>
  766. </div>
  767. </div>
  768. </div>
  769. <div class="dropdown example">
  770. <h4 class="ui header">Input</h4>
  771. <p>A dropdown can contain a <a href="/elements/input.html">ui input</a></p>
  772. <div class="ui floating labeled icon dropdown button">
  773. <i class="filter icon"></i>
  774. <span class="text">Filter</span>
  775. <div class="menu">
  776. <div class="header">
  777. Search Issues
  778. </div>
  779. <div class="ui left icon input">
  780. <i class="search icon"></i>
  781. <input type="text" name="search" placeholder="Search...">
  782. </div>
  783. <div class="header">
  784. <i class="tags icon"></i>
  785. Filter by tag
  786. </div>
  787. <div class="divider"></div>
  788. <div class="item">
  789. <div class="ui red empty circular label"></div>
  790. Important
  791. </div>
  792. <div class="item">
  793. <div class="ui blue empty circular label"></div>
  794. Announcement
  795. </div>
  796. <div class="item">
  797. <div class="ui black empty circular label"></div>
  798. Discussion
  799. </div>
  800. </div>
  801. </div>
  802. </div>
  803. <div class="dropdown example">
  804. <h4 class="ui header">Image</h4>
  805. <p>A dropdown can contain a <a href="/elements/input.html">ui image</a></p>
  806. <div class="ui floating labeled icon dropdown button">
  807. <i class="add user icon"></i>
  808. <span class="text">Add User</span>
  809. <div class="menu">
  810. <div class="header">
  811. People You Might Know
  812. </div>
  813. <div class="item">
  814. <img class="ui mini avatar image" src="/images/avatar/small/jenny.jpg">
  815. Jenny Hess
  816. </div>
  817. <div class="item">
  818. <img class="ui mini avatar image" src="/images/avatar/small/elliot.jpg">
  819. Elliot Fu
  820. </div>
  821. <div class="item">
  822. <img class="ui mini avatar image" src="/images/avatar/small/stevie.jpg">
  823. Stevie Feliciano
  824. </div>
  825. <div class="header">
  826. Your Friends' Friends
  827. </div>
  828. <div class="item">
  829. <img class="ui mini avatar image" src="/images/avatar/small/christian.jpg">
  830. Christian
  831. </div>
  832. <div class="item">
  833. <img class="ui mini avatar image" src="/images/avatar/small/matt.jpg">
  834. Matt
  835. </div>
  836. <div class="item">
  837. <img class="ui mini avatar image" src="/images/avatar/small/justen.jpg">
  838. Justen Kitsune
  839. </div>
  840. </div>
  841. </div>
  842. </div>
  843. <h2 class="ui dividing header">Variations</h2>
  844. <div class="dropdown example">
  845. <h4 class="ui header">Fluid</h4>
  846. <p>A dropdown can take the full width of its parent</p>
  847. <div class="ui vertical menu">
  848. <a class="item">Link 1</a>
  849. <a class="item">Link 2</a>
  850. <div class="header item">All Sections</div>
  851. <div class="ui item">
  852. <div class="ui fluid selection dropdown">
  853. <div class="text">More</div>
  854. <i class="dropdown icon"></i>
  855. <div class="menu">
  856. <div class="item">Choice 1</div>
  857. <div class="item">Choice 2</div>
  858. <div class="item">Choice 3</div>
  859. </div>
  860. </div>
  861. </div>
  862. </div>
  863. </div>
  864. <h2 class="ui dividing header">States</h2>
  865. <div class="dropdown example">
  866. <h4 class="ui header">Error</h4>
  867. <p>An errored dropddown can alert a user to a problem</p>
  868. <div class="ui floating dropdown error">
  869. Dropdown <i class="dropdown icon"></i>
  870. <div class="menu">
  871. <div class="item">Choice 1</div>
  872. <div class="item">Choice 2</div>
  873. <div class="item">Choice 3</div>
  874. </div>
  875. </div>
  876. <br><br>
  877. <div class="ui selection dropdown error">
  878. Dropdown <i class="dropdown icon"></i>
  879. <div class="menu">
  880. <div class="item">Choice 1</div>
  881. <div class="item">Choice 2</div>
  882. <div class="item">Choice 3</div>
  883. </div>
  884. </div>
  885. </div>
  886. <h4 class="ui header">Simple Dropdown (No Javascript)</h4>
  887. <div class="example">
  888. <h4 class="ui header">Active</h4>
  889. <p>An active dropdown has its menu open</p>
  890. <div class="ui info message">An active state will only affect a simple dropdown. To activate a menu on a dropdown module use <code>$('.ui.dropdown').dropdown('show');</code></div>
  891. <div class="ui simple active dropdown">
  892. Dropdown <i class="dropdown icon"></i>
  893. <div class="menu">
  894. <div class="item">Choice 1</div>
  895. <div class="item">Choice 2</div>
  896. </div>
  897. </div>
  898. </div>
  899. <div class="example">
  900. <h4 class="ui header">Disabled</h4>
  901. <p>A disabled dropdown menu will not open or close</p>
  902. <div class="ui info message">A disabled state will only affect a simple dropdown. To disable a dropdown module use <code>$('.ui.dropdown').dropdown('destroy');</code></div>
  903. <div class="ui simple disabled dropdown">
  904. Dropdown <i class="dropdown icon"></i>
  905. <div class="menu">
  906. <div class="item">Choice 1</div>
  907. <div class="item">Choice 2</div>
  908. <div class="item">Choice 3</div>
  909. </div>
  910. </div>
  911. </div>
  912. </div>
  913. <div class="ui tab" data-tab="usage">
  914. <h2 class="ui dividing header">Initializing</h2>
  915. <h3 class="ui header">Initializing a dropdown</h3>
  916. <div class="code" data-label="HTML" data-type="html">
  917. <div class="ui dropdown">
  918. <div class="text">Select</div>
  919. <i class="dropdown icon"></i>
  920. <div class="menu">
  921. <div class="item" data-value="option1">Option 1</div>
  922. <div class="item" data-value="option2">Option 2</div>
  923. </div>
  924. </div>
  925. </div>
  926. <div class="code" data-label="Javascript" data-type="javascript">
  927. $('.ui.dropdown')
  928. .dropdown()
  929. ;
  930. </div>
  931. <h2 class="ui dividing header">Behavior</h2>
  932. <p>All the following <a href="/module.html#/behavior">behaviors</a> can be called using the syntax:</p>
  933. <div class="code">
  934. $('.your.element')
  935. .dropdown('behavior name', argumentOne, argumentTwo)
  936. ;
  937. </div>
  938. <table class="ui definition sortable celled table segment">
  939. <thead>
  940. <tr>
  941. <th>Behavior</th>
  942. <th>Description</th>
  943. </tr>
  944. </thead>
  945. <tbody>
  946. <tr>
  947. <td>toggle</td>
  948. <td>Toggles current visibility of dropdown</td>
  949. </tr>
  950. <tr>
  951. <td>show</td>
  952. <td>Shows dropdown</td>
  953. </tr>
  954. <tr>
  955. <td>hide</td>
  956. <td>Hides dropdown</td>
  957. </tr>
  958. <tr>
  959. <td>hide others</td>
  960. <td>Hides all other dropdowns that is not current dropdown</td>
  961. </tr>
  962. <tr>
  963. <td>restore defaults</td>
  964. <td>Restores dropdown text and value to its value on page load</td>
  965. </tr>
  966. <tr>
  967. <td>restore default text</td>
  968. <td>Restores dropdown text to its value on page load</td>
  969. </tr>
  970. <tr>
  971. <td>restore default value</td>
  972. <td>Restores dropdown value to its value on page load</td>
  973. </tr>
  974. <tr>
  975. <td>save defaults</td>
  976. <td>Saves current text and value as new defaults (for use with restore)</td>
  977. </tr>
  978. <tr>
  979. <td>set selected(value)</td>
  980. <td>Sets selected state to a given value</td>
  981. </tr>
  982. <tr>
  983. <td>set text(text)</td>
  984. <td>Sets dropdown text to a value</td>
  985. </tr>
  986. <tr>
  987. <td>set value(value)</td>
  988. <td>Sets dropdown input to value</td>
  989. </tr>
  990. <tr>
  991. <td>get text</td>
  992. <td>Returns current dropdown text</td>
  993. </tr>
  994. <tr>
  995. <td>get value</td>
  996. <td>Returns current dropdown input value</td>
  997. </tr>
  998. <tr>
  999. <td>get item(value)</td>
  1000. <td>Returns DOM element that matches a given input value</td>
  1001. </tr>
  1002. <tr>
  1003. <td>bind touch events</td>
  1004. <td>Adds touch events to element</td>
  1005. </tr>
  1006. <tr>
  1007. <td>mouse events</td>
  1008. <td>Adds mouse events to element</td>
  1009. </tr>
  1010. <tr>
  1011. <td>bind intent</td>
  1012. <td>Binds a click to document to determine if you click away from a dropdown</td>
  1013. </tr>
  1014. <tr>
  1015. <td>unbind intent</td>
  1016. <td>Unbinds document intent click</td>
  1017. </tr>
  1018. <tr>
  1019. <td>determine intent</td>
  1020. <td>Returns whether event occurred inside dropdown</td>
  1021. </tr>
  1022. <tr>
  1023. <td>determine select action(text, value)</td>
  1024. <td>Triggers preset item selection action based on settings passing text/value</td>
  1025. </tr>
  1026. <tr>
  1027. <td>set active</td>
  1028. <td>Sets dropdown to active state
  1029. <tr>
  1030. <td>set visible</td>
  1031. <td>Sets dropdown to visible state</td>
  1032. </tr>
  1033. <tr>
  1034. <td>remove active</td>
  1035. <td>rRemoves dropdown active state
  1036. <tr>
  1037. <td>remove visible</td>
  1038. <td>Removes dropdown visible state</td>
  1039. </tr>
  1040. <tr>
  1041. <td>is selection</td>
  1042. <td>Returns whether dropdown is a selection dropdown</td>
  1043. </tr>
  1044. <tr>
  1045. <td>is animated</td>
  1046. <td>Returns whether dropdown is animated</td>
  1047. </tr>
  1048. <tr>
  1049. <td>is visible</td>
  1050. <td>Returns whether dropdown is visible</td>
  1051. </tr>
  1052. <tr>
  1053. <td>is hidden</td>
  1054. <td>Returns whether dropdown is hidden</td>
  1055. </tr>
  1056. </tbody>
  1057. </table>
  1058. </div>
  1059. <div class="ui tab" data-tab="examples">
  1060. <div class="transition example">
  1061. <h3 class="ui header">Changing Transitions</h3>
  1062. <p>A dropdown can specify a different <a href="/modules/transition.html">transitions</a>.</p>
  1063. <div class="code" data-type="javascript">
  1064. $('.dropdown')
  1065. .dropdown({
  1066. // you can use any ui transition
  1067. transition: 'drop'
  1068. })
  1069. ;
  1070. </div>
  1071. <div class="ui teal buttons">
  1072. <div class="ui button">Toggle</div>
  1073. <div class="ui floating dropdown icon button">
  1074. <i class="dropdown icon"></i>
  1075. <div class="menu">
  1076. <div class="item" data-value="drop">Drop</div>
  1077. <div class="item" data-value="horizontal flip">Horizontal Flip</div>
  1078. <div class="item" data-value="fade up">Fade Up</div>
  1079. <div class="item" data-value="scale">Scale</div>
  1080. </div>
  1081. </div>
  1082. </div>
  1083. </div>
  1084. <div class="dropdown example">
  1085. <h3 class="ui header">Multiple Levels</h3>
  1086. <p>A dropdown menu can also contain sub menus inside of it</p>
  1087. My favorite animal breed is <div class="ui inline dropdown">
  1088. <input type="hidden" name="gender">
  1089. <div class="text">Shiba Inu</div>
  1090. <i class="dropdown icon"></i>
  1091. <div class="menu">
  1092. <div class="item">
  1093. <i class="dropdown icon"></i>
  1094. Dogs
  1095. <div class="menu">
  1096. <div class="item">Shiba Inu</div>
  1097. <div class="item">Poodle</div>
  1098. <div class="item">Labrador</div>
  1099. </div>
  1100. </div>
  1101. <div class="item">
  1102. <i class="dropdown icon"></i>
  1103. Cats
  1104. <div class="menu">
  1105. <div class="item">Aegean</div>
  1106. <div class="item">Balinese</div>
  1107. <div class="item">Persian</div>
  1108. </div>
  1109. </div>
  1110. </div>
  1111. </div>
  1112. </div>
  1113. <div class="dropdown example">
  1114. <h3 class="ui header">Preserving User Selections</h3>
  1115. <p>This example uses a preset text value to preserve the menu item on page navigation</p>
  1116. <div class="ui ignored info icon message">
  1117. <i class="help circle icon"></i>
  1118. <div class="content">
  1119. <p>A dropdown will automatically select on page load any menu item that includes the currently value of <code>text</code> or your dropdown's <code>hidden input</code> value.</p>
  1120. <p>This is used to preserve a user's selection on page navigation and will automatically remove and default text placeholder formatting.</p>
  1121. </div>
  1122. </div>
  1123. Current action: <div class="ui inline dropdown">
  1124. <div class="text">Hide</div>
  1125. <i class="dropdown icon"></i>
  1126. <div class="menu">
  1127. <div class="item">Edit</div>
  1128. <div class="item">Remove</div>
  1129. <div class="item">Hide</div>
  1130. </div>
  1131. </div>
  1132. </div>
  1133. <div class="dropdown example">
  1134. <h3 class="ui header">Button Group</h3>
  1135. <p>A <a href="/elements/button.html">button group</a> can be formatted to show additional content as a dropdown</p>
  1136. <div class="ui icon buttons">
  1137. <div class="ui top left pointing dropdown button">
  1138. <i class="user icon"></i>
  1139. <div class="menu">
  1140. <div class="item"><i class="edit icon"></i>Edit User</div>
  1141. <div class="item"><i class="delete icon"></i>Remove User</div>
  1142. <div class="item"><i class="hide icon"></i>Make Invisible</div>
  1143. </div>
  1144. </div>
  1145. <div class="ui top left pointing dropdown button">
  1146. <i class="users icon"></i>
  1147. <div class="menu">
  1148. <div class="item"><i class="edit icon"></i>Edit Group</div>
  1149. <div class="item"><i class="delete icon"></i>Remove Group</div>
  1150. <div class="item"><i class="hide icon"></i>Hide from Group</div>
  1151. </div>
  1152. </div>
  1153. <div class="ui top right pointing dropdown button">
  1154. <i class="settings icon"></i>
  1155. <div class="menu">
  1156. <div class="item"><i class="edit icon"></i> Edit</div>
  1157. <div class="item"><i class="delete icon"></i> Remove</div>
  1158. <div class="item"><i class="hide icon"></i> Hide</div>
  1159. </div>
  1160. </div>
  1161. </div>
  1162. </div>
  1163. <div class="hover example">
  1164. <h3 class="ui header">Menu</h3>
  1165. <p>A <a href="/collections/menu.html">menu</a> element can contain a dropdown</p>
  1166. <div class="ui tiered purple inverted menu">
  1167. <div class="menu">
  1168. <a class="active item">
  1169. Home
  1170. </a>
  1171. <a class="ui dropdown item">
  1172. <i class="dropdown icon"></i>Messages
  1173. <div class="menu">
  1174. <div class="item">
  1175. <i class="dropdown icon"></i>
  1176. Categories
  1177. <div class="menu">
  1178. <div class="item">Unread</div>
  1179. <div class="item">Promotions</div>
  1180. <div class="item">Updates</div>
  1181. </div>
  1182. </div>
  1183. <div class="item">Archive</div>
  1184. </div>
  1185. </a>
  1186. <a class="item">
  1187. Browse
  1188. </a>
  1189. </div>
  1190. <div class="sub menu">
  1191. <a class="item">Activity Feed</a>
  1192. <a class="item">Profile</a>
  1193. <a class="item">Events</a>
  1194. </div>
  1195. </div>
  1196. </div>
  1197. <div class="dropdown example">
  1198. <h3 class="ui header">Form</h3>
  1199. <p>A dropdown can be formatted to allow selection inside a <a href="/collections/form.html">form</a></p>
  1200. <div class="ui form segment">
  1201. <p>Let's go ahead and get you signed up.</p>
  1202. <div class="two fields">
  1203. <div class="field">
  1204. <label>First Name</label>
  1205. <input placeholder="First Name" type="text">
  1206. </div>
  1207. <div class="field">
  1208. <label>Last Name</label>
  1209. <input placeholder="Last Name" type="text">
  1210. </div>
  1211. </div>
  1212. <div class="field">
  1213. <label>Gender</label>
  1214. <div class="ui dropdown selection">
  1215. <input type="hidden" name="gender">
  1216. <div class="default text">...</div>
  1217. <i class="dropdown icon"></i>
  1218. <div class="menu">
  1219. <div class="item" data-value="male">Male</div>
  1220. <div class="item" data-value="female">Female</div>
  1221. </div>
  1222. </div>
  1223. </div>
  1224. </div>
  1225. </div>
  1226. <h3 class="ui dividing header">Using Different Dropdown Actions</h3>
  1227. <div class="button example">
  1228. <h4 class="ui header">Combo Dropdowns</h4>
  1229. <div class="ignored">
  1230. <p>A <a href="/elements/button.html">button</a> can be formatted with a dropdown.</p>
  1231. <p>You can change the default action that occurs on selection to different presets built into <em>ui dropdown</em>.</p>
  1232. <p>For example, using the <code>combo</code> preset will change the preceding buttons text value to the current selected alue</p>
  1233. <div class="evaluated code" data-type="javascript">
  1234. $('.combo.dropdown')
  1235. .dropdown({
  1236. action: 'combo'
  1237. })
  1238. ;
  1239. </div>
  1240. <div class="ui teal buttons">
  1241. <div class="ui button">Save</div>
  1242. <div class="ui combo dropdown icon button">
  1243. <i class="dropdown icon"></i>
  1244. <div class="menu">
  1245. <div class="item"><i class="edit icon"></i> Edit</div>
  1246. <div class="item"><i class="delete icon"></i> Delete</div>
  1247. <div class="item"><i class="hide icon"></i> Hide</div>
  1248. </div>
  1249. </div>
  1250. </div>
  1251. </div>
  1252. <div class="link example">
  1253. <h4 class="ui header">Link Dropdowns</h4>
  1254. <div class="ignored">
  1255. <p>If each option in your dropdown links out to another page, you might just want to make your menu hide without changing any value.</p>
  1256. <div class="evaluated code" data-type="javascript">
  1257. $('.link.example .dropdown')
  1258. .dropdown({
  1259. action: 'hide'
  1260. })
  1261. ;
  1262. </div>
  1263. <div class="ui dropdown icon button">
  1264. <div class="text">Go to</div>
  1265. <i class="dropdown icon"></i>
  1266. <div class="menu">
  1267. <a class="item" href="#link1"><i class="home icon"></i> Home</a>
  1268. <a class="item" href="#link2"><i class="users icon"></i> Browse</a>
  1269. <a class="item" href="#link3"><i class="search icon"></i> Search</a>
  1270. </div>
  1271. </div>
  1272. </div>
  1273. </div>
  1274. <div class="ui tab" data-tab="settings">
  1275. <h3 class="ui header">
  1276. Dropdown Settings
  1277. <div class="sub header">Dropdown settings modify the dropdown's behavior</div>
  1278. </h3>
  1279. <table class="ui celled sortable definition table segment">
  1280. <thead>
  1281. <tr>
  1282. <th>Setting</th>
  1283. <th class="four wide">Default</th>
  1284. <th>Description</th>
  1285. </tr>
  1286. </thead>
  1287. <tbody>
  1288. <tr>
  1289. <td>on</td>
  1290. <td>click</td>
  1291. <td>Event used to trigger dropdown (Hover, Click)</td>
  1292. </tr>
  1293. <tr>
  1294. <td>delay</td>
  1295. <td>
  1296. <div class="code">
  1297. delay: {
  1298. show: 50,
  1299. hide: 300
  1300. }
  1301. </div>
  1302. </td>
  1303. <td>Time in milliseconds to debounce show or hide behavior when <code>on: hover</code> is used.</td>
  1304. </tr>
  1305. <tr>
  1306. <td>transition</td>
  1307. <td>
  1308. slide down
  1309. </td>
  1310. <td>Named transition to use when animating menu in and out. Fade and slide down are available without including <a href="/modules/transition.html">ui transitions</a></td>
  1311. </tr>
  1312. <tr>
  1313. <td>duration</td>
  1314. <td>
  1315. 250
  1316. </td>
  1317. <td>Duration of animation events</td>
  1318. </tr>
  1319. <tr>
  1320. <td>action</td>
  1321. <td>auto</td>
  1322. <td>Sets a default action to occur.
  1323. <div class="ui vertical divided list">
  1324. <div class="item">
  1325. <div class="header">activate</div>
  1326. <div class="description">Most likely action will be determined by type of dropdown, for example a selection dropdown will automatically use updateForm</div>
  1327. </div>
  1328. <div class="item">
  1329. <div class="header">combo</div>
  1330. <div class="description">changes text of previous element matching text selector</div>
  1331. </div>
  1332. <div class="item">
  1333. <div class="header">select</div>
  1334. <div class="description">activates menu item but does not change text</div>
  1335. </div>
  1336. <div class="item">
  1337. <div class="header">nothing</div>
  1338. <div class="description">no action occurs</div>
  1339. </div>
  1340. <div class="item">
  1341. <div class="header">hide</div>
  1342. <div class="description">Dropdown menu is hidden</div>
  1343. </div>
  1344. <div class="item">
  1345. <div class="header">function(){}</div>
  1346. <div class="description">custom function is executed</div>
  1347. </div>
  1348. </div>
  1349. </tr>
  1350. </tbody>
  1351. </table>
  1352. <div class="ui horizontal section divider"><i class="icon setting"></i></div>
  1353. <h3 class="ui header">
  1354. Callbacks
  1355. <div class="sub header">Callbacks specify a function to occur after a specific behavior.</div>
  1356. </h3>
  1357. <table class="ui celled sortable definition table segment">
  1358. <thead>
  1359. <tr>
  1360. <th class="four wide">Setting</th>
  1361. <th>Context</th>
  1362. <th>Description</th>
  1363. </tr>
  1364. </thead>
  1365. <tbody>
  1366. <tr>
  1367. <td>onChange(value, text)</td>
  1368. <td>Dropdown</td>
  1369. <td>Is called after a dropdown item is selected. receives the name and value of selection.</td>
  1370. </tr>
  1371. <tr>
  1372. <td>onShow</td>
  1373. <td>Dropdown</td>
  1374. <td>Is called after a dropdown is shown.</td>
  1375. </tr>
  1376. <tr>
  1377. <td>onHide</td>
  1378. <td>Dropdown</td>
  1379. <td>Is called after a dropdown is hidden.</td>
  1380. </tr>
  1381. </tbody>
  1382. </table>
  1383. <h3 class="ui header">
  1384. DOM Settings
  1385. <div class="sub header">DOM settings specify how this module should interface with the DOM</div>
  1386. </h3>
  1387. <table class="ui celled sortable definition table segment">
  1388. <thead>
  1389. <tr>
  1390. <th>Setting</th>
  1391. <th class="four wide">Default</th>
  1392. <th>Description</th>
  1393. </tr>
  1394. </thead>
  1395. <tbody>
  1396. <tr>
  1397. <td>namespace</td>
  1398. <td>dropdown</td>
  1399. <td>Event namespace. Makes sure module teardown does not effect other events attached to an element.</td>
  1400. </tr>
  1401. <tr>
  1402. <td>selector</td>
  1403. <td colspan="2">
  1404. <div class="code">
  1405. selector : {
  1406. input : '> input[type="hidden"]',
  1407. item : '.menu > .item',
  1408. menu : '.menu',
  1409. text : '> .text'
  1410. }
  1411. </div>
  1412. </td>
  1413. </tr>
  1414. <tr>
  1415. <td>metadata</td>
  1416. <td colspan="2">
  1417. <div class="code">
  1418. metadata: {
  1419. text : 'text',
  1420. value : 'value'
  1421. }
  1422. </div>
  1423. </td>
  1424. </tr>
  1425. <tr>
  1426. <td>className</td>
  1427. <td colspan="2">
  1428. <div class="code">
  1429. className : {
  1430. active : 'active',
  1431. disabled : 'disabled',
  1432. placeholder : 'default',
  1433. visible : 'visible'
  1434. }
  1435. </div>
  1436. </td>
  1437. </tr>
  1438. </tbody>
  1439. </table>
  1440. <h3 class="ui header">
  1441. Debug Settings
  1442. <div class="sub header">Debug settings controls debug output to the console</div>
  1443. </h3>
  1444. <table class="ui celled sortable definition table segment">
  1445. <thead>
  1446. <tr>
  1447. <th>Setting</th>
  1448. <th class="four wide">Default</th>
  1449. <th>Description</th>
  1450. </tr>
  1451. </thead>
  1452. <tbody>
  1453. <tr>
  1454. <td>name</td>
  1455. <td>Dropdown</td>
  1456. <td>Name used in debug logs</td>
  1457. </tr>
  1458. <tr>
  1459. <td>debug</td>
  1460. <td>True</td>
  1461. <td>Provides standard debug output to console</td>
  1462. </tr>
  1463. <tr>
  1464. <td>performance</td>
  1465. <td>True</td>
  1466. <td>Provides standard debug output to console</td>
  1467. </tr>
  1468. <tr>
  1469. <td>verbose</td>
  1470. <td>True</td>
  1471. <td>Provides ancillary debug output to console</td>
  1472. </tr>
  1473. <tr>
  1474. <td>error</td>
  1475. <td colspan="2">
  1476. <div class="code">
  1477. error : {
  1478. action : 'You called a dropdown action that was not defined',
  1479. method : 'The method you called is not defined.',
  1480. transition : 'The requested transition was not found'
  1481. }
  1482. </div>
  1483. </td>
  1484. </tr>
  1485. </tbody>
  1486. </table>
  1487. </div>
  1488. </div>