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.

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