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.

439 lines
13 KiB

  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>UI Form - Semantic</title>
  6. <link rel="stylesheet" class="ui" href="../src/ui/flat/panel.css" type="text/css" media="screen" />
  7. <link rel="stylesheet" class="ui" href="../src/ui/flat/button.css" type="text/css" media="screen" />
  8. <link rel="stylesheet" class="ui" href="../src/ui/flat/text.css" type="text/css" media="screen" />
  9. <link rel="stylesheet" class="ui" href="../src/ui/flat/form.css" type="text/css" media="screen" />
  10. <link rel="stylesheet" class="ui" href="../src/ui/flat/divider.css" type="text/css" media="screen" />
  11. <link rel="stylesheet" class="ui" href="../src/ui/flat/block.css" type="text/css" media="screen" />
  12. <link rel="stylesheet" class="ui" href="../src/ui/flat/segment.css" type="text/css" media="screen" />
  13. <link rel="stylesheet" class="ui" href="../src/ui/flat/checkbox.css" type="text/css" media="screen" />
  14. <link rel="stylesheet" class="ui" href="../src/ui/flat/icons.css" type="text/css" media="screen" />
  15. <link rel="stylesheet" href="../src/ui/flat/menu.css" type="text/css" media="screen" />
  16. <link rel="stylesheet" href="../src/modules/shape.css" type="text/css" media="screen" />
  17. <link rel="stylesheet" href="library/sidr.css" type="text/css" media="screen" />
  18. <link rel="stylesheet" href="stylesheets/example.css" type="text/css" media="screen" />
  19. <script src="../dependencies/jquery.js" type="text/javascript"></script>
  20. <script src="../src/modules/ui/shape.js" type="text/javascript"></script>
  21. <script src="../src/modules/behavior/state.js" type="text/javascript"></script>
  22. <script src="library/sidr.js" type="text/javascript"></script>
  23. <script src="library/waypoints.js" type="text/javascript"></script>
  24. <script src="javascript/example.js" type="text/javascript"></script>
  25. </head>
  26. <body id="example">
  27. <div class="sidr" id="menu">
  28. <ul>
  29. <li><a href="module.html">Introduction</a></li>
  30. <li><a>Download</a></li>
  31. <li><a href="#">UI</a>
  32. <ul>
  33. <li class="active"><a href="button.html">Button</a></li>
  34. <li><a>Text</a></li>
  35. <li><a>Headers</a></li>
  36. <li><a>Columns</a></li>
  37. <li><a>Elements (Grid System)</a></li>
  38. <li><a>Tags</a></li>
  39. <li><a>Items (Lists of Content)</a></li>
  40. <li><a>Panels (Type of Menu)</a></li>
  41. <li><a>Forms</a></li>
  42. <li><a>Fields</a></li>
  43. <li><a>Checkboxes</a></li>
  44. <li><a>Icons</a></li>
  45. <li><a>Dividers</a></li>
  46. </ul>
  47. </li>
  48. <li><a href="#">UI Modules</a>
  49. <ul>
  50. <li><a>Accordion</a></li>
  51. <li><a>Chat Room</a></li>
  52. <li><a>Modal</a></li>
  53. <li><a>Nag</a></li>
  54. <li><a>Popup</a></li>
  55. <li><a>Search</a></li>
  56. <li><a>Star Rating</a></li>
  57. <li><a>Tabs</a></li>
  58. </ul>
  59. </li>
  60. <li><a href="#">Behavioral Modules</a>
  61. <ul>
  62. <li><a>API</a></li>
  63. <li><a>Animation</a></li>
  64. <li><a>Form Validation</a></li>
  65. <li><a>Placeholder Text</a></li>
  66. <li><a class="shape.html">Shape</a></li>
  67. <li><a>State</a></li>
  68. </ul>
  69. </li>
  70. </ul>
  71. </div>
  72. <div class="ui large fixed transparent black menu">
  73. <div class="container">
  74. <div class="title item">
  75. Semantic UI: Form
  76. </div>
  77. <div class="icon previous link item">
  78. <a href="button.html"><i class="icon left-open"></i></a>
  79. </div>
  80. <div class="section dropdown item">
  81. 2 of 14
  82. <div class="menu">
  83. <a href="button.html" class="item">1. Button</a>
  84. <a class="active item">2. Form</a>
  85. <a class="item">3. Headers</a>
  86. <a class="item">4. Columns</a>
  87. <a class="item">5. Elements</a>
  88. <a class="item">6. Tags</a>
  89. <a class="item">7. Items</a>
  90. <a class="item">8. Panels</a>
  91. </div>
  92. </div>
  93. <div class="icon next link item">
  94. <i class="icon right-open"></i>
  95. </div>
  96. <div class="right menu">
  97. <a class="item" href="https://github.com/quirkyinc/semantic">
  98. <i class="icon cloud"></i>
  99. </a>
  100. <a class="item" href="https://github.com/quirkyinc/semantic">
  101. <i class="icon github"></i>
  102. </a>
  103. <div class="dropdown item">
  104. <i class="icon cog"></i>
  105. <div class="menu">
  106. <div class="swap item">Change Theme</div>
  107. <div class="item">About Semantic</div>
  108. <div class="item">Choice 3</div>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. <div class="ui huge left attached vertical side buttons">
  115. <div class="ui blue menu button">Menu</div>
  116. </div>
  117. <div class="segment">
  118. <div class="container">
  119. <h1>Form</h1>
  120. <p>Forms are a grouping of elements requiring user input.</p>
  121. <p>
  122. Forms always include fields, and fields always contain form elements. Fields themselves may also include:
  123. <a href="#">standard form fields</a>, like labels, inputs and textareas, as well as:
  124. <a href="#">checkboxes</a>,
  125. <a href="#">sliders</a>, and
  126. <a href="#">message blocks</a>.
  127. </p>
  128. <p>Validation messages are <a href="#">text blocks</a> which are formatted for use inside forms.</p>
  129. </div>
  130. </div>
  131. <div class="main container">
  132. <div class="peek">
  133. <div class="ui large vertical pointing bottom attached panel">
  134. <li class="active">Standard</li>
  135. <li>States</li>
  136. <li>Variations</li>
  137. <li>Group</li>
  138. </div>
  139. </div>
  140. <h2>Standard</h2>
  141. <h4>Form:</h4>
  142. <p>A form is a collection of user input elements, and has no stylings of its own.</p>
  143. <div class="ui form segment">
  144. <p>Let's go ahead and get you signed up.</p>
  145. <div class="two fields">
  146. <div class="field">
  147. <label>First Name</label>
  148. <input placeholder="First Name" type="text">
  149. </div>
  150. <div class="field">
  151. <label>Last Name</label>
  152. <input placeholder="Last Name" type="text">
  153. </div>
  154. </div>
  155. <div class="field">
  156. <label>Username</label>
  157. <input placeholder="Username" type="text">
  158. </div>
  159. <div class="field">
  160. <label>Password</label>
  161. <input type="password">
  162. </div>
  163. <div class="inline field">
  164. <div class="ui checkbox">
  165. <input type="checkbox" id="terms" />
  166. <label for="terms"></label>
  167. </div>
  168. <label>I agree to the terms and conditions</label>
  169. </div>
  170. <div class="ui blue submit button">Submit</div>
  171. </div>
  172. <h3>Types of Content</h3>
  173. <h4>Field</h4>
  174. <p>A field is a form element containing a label and an input</p>
  175. <div class="ui form">
  176. <div class="field">
  177. <label>User Input</label>
  178. <input type="text">
  179. </div>
  180. </div>
  181. <h4>Text Area</h4>
  182. <p>A textarea uses the default form element</p>
  183. <div class="ui form">
  184. <div class="field">
  185. <label>User Text</label>
  186. <textarea></textarea>
  187. </div>
  188. </div>
  189. <h4>Checkbox</h4>
  190. <p>Checkboxes are styled forms of standard form checkboxes.</p>
  191. <div class="ui form">
  192. <div class="field">
  193. <label>Checkbox (Using attribute ID to trigger checked event)</label>
  194. <div class="ui checkbox">
  195. <input type="checkbox" id="uniqueid" />
  196. <label for="uniqueid"></label>
  197. </div>
  198. </div>
  199. <div class="field">
  200. <label>Checkbox (<a href="#">Javascript</a>)</label>
  201. <div class="ui checkbox">
  202. <input type="checkbox"/>
  203. <label></label>
  204. </div>
  205. </div>
  206. </div>
  207. <h4>Validation</h4>
  208. <p>Text blocks have special meaning inside a form tag. All message blocks are hidden by default.</p>
  209. <div class="ui form">
  210. <div class="ui block">
  211. <div class="header">We had some issues</div>
  212. <ul class="list">
  213. <li>Please enter your first name</li>
  214. <li>Please enter your last name</li>
  215. </ul>
  216. </div>
  217. </div>
  218. <h2>States</h2>
  219. <h3>Form</h3>
  220. <h4>Loading</h4>
  221. <p>If a form is in loading state, it will automatically show a loading indicator:</p>
  222. <div class="ui loading form segment">
  223. <div class="two fields">
  224. <div class="field">
  225. <label>First Name</label>
  226. <input placeholder="First Name" type="text">
  227. </div>
  228. <div class="field">
  229. <label>Last Name</label>
  230. <input placeholder="Last Name" type="text">
  231. </div>
  232. </div>
  233. <div class="field">
  234. <label>Username</label>
  235. <input placeholder="Username" type="text">
  236. </div>
  237. <div class="field">
  238. <label>Password</label>
  239. <input type="password">
  240. </div>
  241. <div class="inline field">
  242. <div class="ui checkbox">
  243. <input type="checkbox" id="terms" />
  244. <label for="terms"></label>
  245. </div>
  246. <label>I agree to the terms and conditions</label>
  247. </div>
  248. <div class="ui blue submit button">Submit</div>
  249. </div>
  250. <h4>Error</h4>
  251. <p>If form is in an error state, it will automatically show any error message blocks:</p>
  252. <div class="ui error form segment">
  253. <div class="ui error block">
  254. <div class="header">Action Forbidden</div>
  255. <p>You can only sign up for an account once with a given e-mail address.</p>
  256. </div>
  257. <div class="two fields">
  258. <div class="field">
  259. <label>First Name</label>
  260. <input placeholder="First Name" type="text">
  261. </div>
  262. <div class="field">
  263. <label>Last Name</label>
  264. <input placeholder="Last Name" type="text">
  265. </div>
  266. </div>
  267. <div class="field">
  268. <label>Username</label>
  269. <input placeholder="Username" type="text">
  270. </div>
  271. <div class="field">
  272. <label>Password</label>
  273. <input type="password">
  274. </div>
  275. <div class="inline field">
  276. <div class="ui checkbox">
  277. <input type="checkbox" id="terms" />
  278. <label for="terms"></label>
  279. </div>
  280. <label>I agree to the terms and conditions</label>
  281. </div>
  282. <div class="ui blue submit button">Submit</div>
  283. </div>
  284. <h4>Warning</h4>
  285. <p>If form is in warning state, it will automatically show any warning message block:</p>
  286. <div class="ui warning form segment">
  287. <div class="ui warning block">
  288. <div class="header">Could you check something!</div>
  289. <ul class="list">
  290. <li>You forgot your <b>first name</b></li>
  291. <li>And also your <b>last name</b></li>
  292. </ul>
  293. </div>
  294. <div class="two error fields">
  295. <div class="field">
  296. <label>First Name</label>
  297. <input placeholder="First Name" type="text">
  298. </div>
  299. <div class="field">
  300. <label>Last Name</label>
  301. <input placeholder="Last Name" type="text">
  302. </div>
  303. </div>
  304. <div class="field">
  305. <label>Username</label>
  306. <input placeholder="Username" type="text">
  307. </div>
  308. <div class="field">
  309. <label>Password</label>
  310. <input type="password">
  311. </div>
  312. <div class="inline field">
  313. <div class="ui checkbox">
  314. <input type="checkbox" id="terms" />
  315. <label for="terms"></label>
  316. </div>
  317. <label>I agree to the terms and conditions</label>
  318. </div>
  319. <div class="ui blue submit button">Submit</div>
  320. </div>
  321. <h3>Form Fields</h3>
  322. <h4>Error</h4>
  323. <p>Individual fields may contain an error state</p>
  324. <div class="ui error form segment">
  325. <div class="two fields">
  326. <div class="field error">
  327. <label>First Name</label>
  328. <input placeholder="First Name" type="text">
  329. </div>
  330. <div class="field">
  331. <label>Last Name</label>
  332. <input placeholder="Last Name" type="text">
  333. </div>
  334. </div>
  335. </div>
  336. <h4>Disabled</h4>
  337. <p>Individual fields may be disabled or read only</p>
  338. <div class="ui error form segment">
  339. <div class="two fields">
  340. <div class="field">
  341. <label>First Name</label>
  342. <input placeholder="Read Only" readonly="readonly" type="text">
  343. </div>
  344. <div class="disabled field">
  345. <label>Last Name</label>
  346. <input placeholder="Disabled" disabled="disabled" type="text">
  347. </div>
  348. </div>
  349. </div>
  350. <h2>Variations</h2>
  351. <h4>Size</h4>
  352. <p>A form can also be small or large</p>
  353. <div class="ui small form segment">
  354. <div class="ui info block">
  355. <div class="header">We had some issues</div>
  356. <ul class="list">
  357. <li>Please enter your first name</li>
  358. <li>Please enter your last name</li>
  359. </ul>
  360. </div>
  361. <div class="two fields">
  362. <div class="field">
  363. <label>First Name</label>
  364. <input placeholder="First Name" type="text">
  365. </div>
  366. <div class="field">
  367. <label>Last Name</label>
  368. <input placeholder="Last Name" type="text">
  369. </div>
  370. </div>
  371. <div class="ui blue submit button">Submit</div>
  372. </div>
  373. <br><br>
  374. <div class="ui large form segment">
  375. <div class="ui info block">
  376. <div class="header">We had some issues</div>
  377. <ul class="list">
  378. <li>Please enter your first name</li>
  379. <li>Please enter your last name</li>
  380. </ul>
  381. </div>
  382. <div class="two fields">
  383. <div class="field">
  384. <label>First Name</label>
  385. <input placeholder="First Name" type="text">
  386. </div>
  387. <div class="field">
  388. <label>Last Name</label>
  389. <input placeholder="Last Name" type="text">
  390. </div>
  391. </div>
  392. <div class="ui blue submit button">Submit</div>
  393. </div>
  394. <h3>Fields</h3>
  395. <h4>Inline</h4>
  396. <p>A field can have its label next to instead of above it.</p>
  397. <div class="ui form">
  398. <div class="ui inline fields">
  399. <div class="field">
  400. <label>Last name</label>
  401. <input type="text" placeholder="Full Name">
  402. </div>
  403. </div>
  404. </div>
  405. </div>
  406. </body>
  407. </html>