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.

584 lines
16 KiB

  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>UI Table - 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/table.css" type="text/css" media="screen" />
  12. <link rel="stylesheet" class="ui" href="../src/ui/flat/block.css" type="text/css" media="screen" />
  13. <link rel="stylesheet" class="ui" href="../src/ui/flat/segment.css" type="text/css" media="screen" />
  14. <link rel="stylesheet" class="ui" href="../src/ui/flat/checkbox.css" type="text/css" media="screen" />
  15. <link rel="stylesheet" class="ui" href="../src/ui/flat/icons.css" type="text/css" media="screen" />
  16. <link rel="stylesheet" href="../src/ui/flat/menu.css" type="text/css" media="screen" />
  17. <link rel="stylesheet" href="../src/modules/ui/shape.css" type="text/css" media="screen" />
  18. <link rel="stylesheet" href="library/sidr.css" type="text/css" media="screen" />
  19. <link rel="stylesheet" href="stylesheets/example.css" type="text/css" media="screen" />
  20. <script src="library/jquery.js" type="text/javascript"></script>
  21. <script src="library/tablesort.js" type="text/javascript"></script>
  22. <script src="library/ace/ace.js" type="text/javascript"></script>
  23. <script src="library/sidr.js" type="text/javascript"></script>
  24. <script src="library/waypoints.js" type="text/javascript"></script>
  25. <script src="javascript/semantic.js" type="text/javascript"></script>
  26. <script src="javascript/table.js" type="text/javascript"></script>
  27. <script src="../src/modules/ui/shape.js" type="text/javascript"></script>
  28. <script src="../src/modules/behavior/state.js" type="text/javascript"></script>
  29. </head>
  30. <body id="example">
  31. <div class="sidr" id="menu">
  32. <ul>
  33. <li><a href="module.html">Introduction</a></li>
  34. <li><a>Download</a></li>
  35. <li><a href="#">UI</a>
  36. <ul>
  37. <li><a href="button.html">Button</a></li>
  38. <li><a href="form.html">Forms</a></li>
  39. <li><a href="table.html">Table</a></li>
  40. <li><a href="table.html">Steps</a></li>
  41. <li><a href="table.html">Progress</a></li>
  42. <li><a href="text.html">Text Block</a></li>
  43. <li><a href="header.html">Headers</a></li>
  44. <li><a href="header.html">Segment</a></li>
  45. <li><a href="column.html">Columns</a></li>
  46. <li><a href="element.html">Elements (Grid System)</a></li>
  47. <li><a href="tag.html">Tags</a></li>
  48. <li><a href="item.html">Items (Lists of Content)</a></li>
  49. <li><a href="panel.html">Panels (Type of Menu)</a></li>
  50. <li><a href="icon.html">Icons</a></li>
  51. <li><a href="divider.html">Dividers</a></li>
  52. </ul>
  53. </li>
  54. <li><a href="#">UI Collections</a>
  55. <ul>
  56. <li><a href="activity.html">Activity Feed</a></li>
  57. <li><a href="list.html">Content List</a></li>
  58. <li><a href="user-list.html">User List</a></li>
  59. <li><a href="form.html">Forms</a></li>
  60. </ul>
  61. </li>
  62. <li><a href="#">UI Modules</a>
  63. <ul>
  64. <li><a href="accordion.html">Accordion</a></li>
  65. <li><a href="chatroom.html">Chat Room</a></li>
  66. <li><a href="modal.html">Modal</a></li>
  67. <li><a href="nag.html">Nag</a></li>
  68. <li><a href="popup.html">Popup</a></li>
  69. <li><a href="search.html">Search</a></li>
  70. <li><a href="star.html">Star Rating</a></li>
  71. <li><a href="tab.html">Tabs</a></li>
  72. </ul>
  73. </li>
  74. <li><a href="#">Behavioral Modules</a>
  75. <ul>
  76. <li><a href="api.html">API</a></li>
  77. <li><a href="animation.html">Animation</a></li>
  78. <li><a href="validate.html">Form Validation</a></li>
  79. <li><a href="placeholder.html">Placeholder Text</a></li>
  80. <li><a href="shape.html">Shape</a></li>
  81. <li><a href="state.html">State</a></li>
  82. </ul>
  83. </li>
  84. </ul>
  85. </div>
  86. <div class="ui large fixed transparent black menu">
  87. <div class="container">
  88. <div class="title item">
  89. Semantic UI: Form
  90. </div>
  91. <div class="icon previous link item">
  92. <a href="form.html"><i class="icon left-open"></i></a>
  93. </div>
  94. <div class="section dropdown item">
  95. 3 of 14
  96. <div class="menu">
  97. <a href="button.html" class="item">1. Button</a>
  98. <a href="form.html" class="item">2. Form</a>
  99. <a class="active item">3. Table</a>
  100. <a class="item">4. Columns</a>
  101. <a class="item">5. Elements</a>
  102. <a class="item">6. Tags</a>
  103. <a class="item">7. Items</a>
  104. <a class="item">8. Panels</a>
  105. </div>
  106. </div>
  107. <div class="icon next link item">
  108. <i class="icon right-open"></i>
  109. </div>
  110. <div class="right menu">
  111. <a class="item" href="https://github.com/quirkyinc/semantic">
  112. <i class="icon cloud"></i>
  113. </a>
  114. <a class="item" href="https://github.com/quirkyinc/semantic">
  115. <i class="icon github"></i>
  116. </a>
  117. <div class="dropdown item">
  118. <i class="icon cog"></i>
  119. <div class="menu">
  120. <div class="swap item">Change Theme</div>
  121. <div class="item">About Semantic</div>
  122. <div class="item">Choice 3</div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <div class="ui huge left attached vertical side buttons">
  129. <div class="ui blue menu button">Menu</div>
  130. </div>
  131. <div class="segment">
  132. <div class="container">
  133. <h1>Tables</h1>
  134. <p>Tables are useful for displaying collections of tuples.</p>
  135. <p>
  136. Tables consist of an optional table header, content, and table footer. They may be formatted to show numeric content or for rows of text.
  137. </p>
  138. <p>Although no plugin has been created using the <a href="generated/multiple.html">semantic module spec</a> for sorting tables, other plugins such as kylefox's <a href="https://github.com/kylefox/jquery-tablesort">tablesort</a> may be useful.</p>
  139. </div>
  140. </div>
  141. <div class="main container">
  142. <div class="peek">
  143. <div class="ui large vertical pointing bottom attached panel">
  144. <li class="active">Standard</li>
  145. <li>States</li>
  146. <li>Variations</li>
  147. </div>
  148. </div>
  149. <h2>Standard</h2>
  150. <div class="example">
  151. <h4>Table</h4>
  152. <p>A standard table</p>
  153. <table class="ui table">
  154. <thead>
  155. <th>Name</th>
  156. <th>Status</th>
  157. <th>Notes</th>
  158. </thead>
  159. <tbody>
  160. <tr>
  161. <td>John</td>
  162. <td>Approved</td>
  163. <td>None</td>
  164. </tr>
  165. <tr>
  166. <td>Jamie</td>
  167. <td>Approved</td>
  168. <td>Requires call</td>
  169. </tr>
  170. <tr>
  171. <td>Jill</td>
  172. <td>Denied</td>
  173. <td>None</td>
  174. </tr>
  175. </tbody>
  176. <tfoot>
  177. <th colspan="3">
  178. <div class="ui blue button">Add User</div>
  179. </th>
  180. </tfoot>
  181. </table>
  182. </div>
  183. <h2>States</h2>
  184. <div class="example">
  185. <h4>Positive / Negative</h4>
  186. <p>A cell may let a user know whether a value is good or bad:</p>
  187. <table class="ui grid table">
  188. <thead>
  189. <th>Name</th>
  190. <th>Status</th>
  191. <th>Notes</th>
  192. </thead>
  193. <tbody>
  194. <tr>
  195. <td>No Name Specified</td>
  196. <td>Approved</td>
  197. <td>None</td>
  198. </tr>
  199. <tr class="positive">
  200. <td>Jimmy</td>
  201. <td>Approved</td>
  202. <td>None</td>
  203. </tr>
  204. <tr>
  205. <td>Jamie</td>
  206. <td>Approved</td>
  207. <td class="negative">Requires call</td>
  208. </tr>
  209. <tr>
  210. <td>Jill</td>
  211. <td>Approved</td>
  212. <td>None</td>
  213. </tr>
  214. </tbody>
  215. </table>
  216. </div>
  217. <h3>Cells</h3>
  218. <div class="example">
  219. <h4>Error</h4>
  220. <p>A cell or row may alert the user to an error or a negative value:</p>
  221. <table class="ui grid table">
  222. <thead>
  223. <th>Name</th>
  224. <th>Status</th>
  225. <th>Notes</th>
  226. </thead>
  227. <tbody>
  228. <tr>
  229. <td>No Name Specified</td>
  230. <td>Approved</td>
  231. <td>None</td>
  232. </tr>
  233. <tr class="error">
  234. <td>Jimmy</td>
  235. <td>Approved</td>
  236. <td>None</td>
  237. </tr>
  238. <tr>
  239. <td>Jamie</td>
  240. <td>Approved</td>
  241. <td class="error">Requires call</td>
  242. </tr>
  243. <tr>
  244. <td>Jill</td>
  245. <td>Approved</td>
  246. <td>None</td>
  247. </tr>
  248. </tbody>
  249. </table>
  250. </div>
  251. <div class="example">
  252. <h4>Warning</h4>
  253. <p>A cell or row may warn a user:</p>
  254. <table class="ui grid table">
  255. <thead>
  256. <th>Name</th>
  257. <th>Status</th>
  258. <th>Notes</th>
  259. </thead>
  260. <tbody>
  261. <tr>
  262. <td>No Name Specified</td>
  263. <td>Approved</td>
  264. <td>None</td>
  265. </tr>
  266. <tr class="warning">
  267. <td>Jimmy</td>
  268. <td>Approved</td>
  269. <td>None</td>
  270. </tr>
  271. <tr>
  272. <td>Jamie</td>
  273. <td>Approved</td>
  274. <td class="warning">Requires call</td>
  275. </tr>
  276. <tr>
  277. <td>Jill</td>
  278. <td>Approved</td>
  279. <td>None</td>
  280. </tr>
  281. </tbody>
  282. </table>
  283. </div>
  284. <div class="example">
  285. <h4>Active</h4>
  286. <p>A cell or row can be active:</p>
  287. <table class="ui grid table">
  288. <thead>
  289. <th>Name</th>
  290. <th>Status</th>
  291. <th>Notes</th>
  292. </thead>
  293. <tbody>
  294. <tr>
  295. <td>Jamie</td>
  296. <td>Approved</td>
  297. <td>Requires call</td>
  298. </tr>
  299. <tr class="active">
  300. <td>John</td>
  301. <td>Approved</td>
  302. <td>None</td>
  303. </tr>
  304. <tr>
  305. <td>Jamie</td>
  306. <td>Approved</td>
  307. <td>Requires call</td>
  308. </tr>
  309. <tr>
  310. <td class="active">Jill</td>
  311. <td>Approved</td>
  312. <td>None</td>
  313. </tr>
  314. </tbody>
  315. </table>
  316. </div>
  317. <h2>Variations</h2>
  318. <div class="example">
  319. <h4>Collapsing</h4>
  320. <p>By default tables take the size of their container. A collapsing takes up only as much space as its rows.</p>
  321. <table class="ui grid table collapsing">
  322. <thead>
  323. <th>Name</th>
  324. <th>Status</th>
  325. <th>Notes</th>
  326. </thead>
  327. <tbody>
  328. <tr>
  329. <td>John</td>
  330. <td>Approved</td>
  331. <td>None</td>
  332. </tr>
  333. <tr>
  334. <td>Jamie</td>
  335. <td>Approved</td>
  336. <td>Requires call</td>
  337. </tr>
  338. <tr>
  339. <td>Jill</td>
  340. <td>Denied</td>
  341. <td>None</td>
  342. </tr>
  343. </tbody>
  344. <tfoot>
  345. <th>3 People</th>
  346. <th>2 Approved</th>
  347. <th></th>
  348. </tfoot>
  349. </table>
  350. </div>
  351. <div class="example">
  352. <h4>Grid</h4>
  353. <p>A table may have a grid to help differentiate cells</p>
  354. <table class="ui grid table">
  355. <thead>
  356. <th>Name</th>
  357. <th>Status</th>
  358. <th>Notes</th>
  359. </thead>
  360. <tbody>
  361. <tr>
  362. <td>John</td>
  363. <td>Approved</td>
  364. <td>None</td>
  365. </tr>
  366. <tr>
  367. <td>Jamie</td>
  368. <td>Approved</td>
  369. <td>Requires call</td>
  370. </tr>
  371. <tr>
  372. <td>Jill</td>
  373. <td>Denied</td>
  374. <td>None</td>
  375. </tr>
  376. </tbody>
  377. <tfoot>
  378. <th>3 People</th>
  379. <th>2 Approved</th>
  380. <th></th>
  381. </tfoot>
  382. </table>
  383. </div>
  384. <div class="example">
  385. <h4>Sortable</h4>
  386. <p>A table may allow a user to sort contents by clicking on a table header.</p>
  387. <p>Adding a classname of ascending or descending, will show the user the direction of sort. This example uses a modified version of the kylefox's <a href="library/tablesort.js">tablesort plugin</a> to provide the proper class names.</p>
  388. <table class="ui sortable grid table">
  389. <thead>
  390. <th>Name</th>
  391. <th>Status</th>
  392. <th>Notes</th>
  393. </thead>
  394. <tbody>
  395. <tr>
  396. <td>John</td>
  397. <td>No Action</td>
  398. <td>None</td>
  399. </tr>
  400. <tr>
  401. <td>Jamie</td>
  402. <td class="positive">Approved</td>
  403. <td class="warning">Requires call</td>
  404. </tr>
  405. <tr>
  406. <td>Jill</td>
  407. <td class="negative">Denied</td>
  408. <td>None</td>
  409. </tr>
  410. </tbody>
  411. <tfoot>
  412. <th>3 People</th>
  413. <th>2 Approved</th>
  414. <th></th>
  415. </tfoot>
  416. </table>
  417. </div>
  418. <div class="example">
  419. <h4>Padded</h4>
  420. <p>A table may sometimes need to be more padded for legibility</p>
  421. <table class="ui padded grid table">
  422. <thead>
  423. <th>Name</th>
  424. <th>Status</th>
  425. <th>Notes</th>
  426. </thead>
  427. <tbody>
  428. <tr>
  429. <td>John</td>
  430. <td>Approved</td>
  431. <td>He is a very nice guy and I enjoyed talking to him on the telephone. I hope we get to talk again.</td>
  432. </tr>
  433. <tr>
  434. <td>Jamie</td>
  435. <td>Approved</td>
  436. <td>Jamie was not interested in purchasing our product.</td>
  437. </tr>
  438. </tbody>
  439. </table>
  440. </div>
  441. <div class="example">
  442. <h4>Compact</h4>
  443. <p>A table may sometimes need to be more compact to make more rows visible at a time</p>
  444. <table class="ui compact grid table">
  445. <thead>
  446. <th>Name</th>
  447. <th>Status</th>
  448. <th>Notes</th>
  449. </thead>
  450. <tbody>
  451. <tr>
  452. <td>John</td>
  453. <td>Approved</td>
  454. <td>None</td>
  455. </tr>
  456. <tr>
  457. <td>Jamie</td>
  458. <td>Approved</td>
  459. <td>Requires call</td>
  460. </tr>
  461. <tr>
  462. <td>John</td>
  463. <td>Approved</td>
  464. <td>None</td>
  465. </tr>
  466. <tr>
  467. <td>Jamie</td>
  468. <td>Approved</td>
  469. <td>Requires call</td>
  470. </tr>
  471. <tr>
  472. <td>John</td>
  473. <td>Approved</td>
  474. <td>None</td>
  475. </tr>
  476. <tr>
  477. <td>Jamie</td>
  478. <td>Approved</td>
  479. <td>Requires call</td>
  480. </tr>
  481. <tr>
  482. <td>John</td>
  483. <td>Approved</td>
  484. <td>None</td>
  485. </tr>
  486. <tr>
  487. <td>Jamie</td>
  488. <td>Approved</td>
  489. <td>Requires call</td>
  490. </tr>
  491. </tbody>
  492. </table>
  493. </div>
  494. <div class="example">
  495. <h4>Size</h4>
  496. <p>A table can also be small or large</p>
  497. <table class="ui small table">
  498. <thead>
  499. <th>Name</th>
  500. <th>Status</th>
  501. <th>Notes</th>
  502. </thead>
  503. <tbody>
  504. <tr>
  505. <td>John</td>
  506. <td>Approved</td>
  507. <td>None</td>
  508. </tr>
  509. <tr>
  510. <td>Jamie</td>
  511. <td>Approved</td>
  512. <td>Requires call</td>
  513. </tr>
  514. <tr>
  515. <td>Jill</td>
  516. <td>Denied</td>
  517. <td>None</td>
  518. </tr>
  519. </tbody>
  520. <tfoot>
  521. <th>3 People</th>
  522. <th>2 Approved</th>
  523. <th></th>
  524. </tfoot>
  525. </table>
  526. <br><br>
  527. <table class="ui large table">
  528. <thead>
  529. <th>Name</th>
  530. <th>Status</th>
  531. <th>Notes</th>
  532. </thead>
  533. <tbody>
  534. <tr>
  535. <td>John</td>
  536. <td>Approved</td>
  537. <td>None</td>
  538. </tr>
  539. <tr>
  540. <td>Jamie</td>
  541. <td>Approved</td>
  542. <td>Requires call</td>
  543. </tr>
  544. <tr>
  545. <td>Jill</td>
  546. <td>Denied</td>
  547. <td>None</td>
  548. </tr>
  549. </tbody>
  550. <tfoot>
  551. <th>3 People</th>
  552. <th>2 Approved</th>
  553. <th></th>
  554. </tfoot>
  555. </table>
  556. </div>
  557. </div>
  558. </body>
  559. </html>