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.

637 lines
17 KiB

11 years ago
11 years ago
  1. <!DOCTYPE html>
  2. <head>
  3. <!-- Standard Meta -->
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  6. <meta name="viewport" content="width=device-width" />
  7. <!-- Site Properities -->
  8. <meta http-equiv="X-Powered-By" content="DocPad v6.32.0"/>
  9. <title>Table | Semantic UI</title>
  10. <meta name="description" content="Semantic empowers designers and developers by creating a shared vocabulary for UI." />
  11. <meta name="keywords" content="html5, ui, library, framework, javascript" />
  12. <link rel="stylesheet" type="text/css" href="/stylesheets/reset.css">
  13. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/icons.css">
  14. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/button.css">
  15. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/header.css">
  16. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/label.css">
  17. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/divider.css">
  18. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/block.css">
  19. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/segment.css">
  20. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/grid.css">
  21. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/table.css">
  22. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/form.css">
  23. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/menu.css">
  24. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/modules/shape.css">
  25. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/modules/checkbox.css">
  26. <link rel="stylesheet" type="text/css" href="/stylesheets/library/sidr.css">
  27. <link rel="stylesheet" type="text/css" href="/stylesheets/semantic.css">
  28. <link rel="stylesheet" type="text/css" href="/stylesheets/shape.css">
  29. <script src="/javascript/library/jquery.js"></script>
  30. <script src="/javascript/library/ace/ace.js"></script>
  31. <script src="/javascript/library/sidr.js"></script>
  32. <script src="/javascript/library/waypoints.js"></script>
  33. <script src="/ui/flat/modules/behavior/state.js"></script>
  34. <script src="/ui/flat/modules/shape.js"></script>
  35. <script src="/ui/flat/modules/checkbox.js"></script>
  36. <script src="/javascript/semantic.js"></script>
  37. <script src="/javascript/shape.js"></script>
  38. </head>
  39. <body id="example">
  40. <div class="ui large vertical menu" id="menu">
  41. <div class="header item">Table of Contents</div>
  42. <div class="item"><a href="/index.html"><b>Introduction</b></a></div>
  43. <div class="item"><a href="/download.html"><b>Download</b></a></div>
  44. <div class="item">
  45. <a href="/element.html"><b>UI Elements</b></a>
  46. <div class="menu">
  47. <a class="item" href="/elements/button.html">Button</a>
  48. <a class="item" href="/elements/label.html">Label</a>
  49. </div>
  50. </div>
  51. <div class="item">
  52. <a href="/collection.html"><b>UI Collections</b></a>
  53. <div class="menu">
  54. <a class="item" href="/collections/form.html">Form</a>
  55. <a class="item" href="/collections/grid.html">Grid</a>
  56. <a class="item" href="/collections/menu.html">Menu</a>
  57. <a class="active item" href="/collections/table.html">Table</a>
  58. <a class="item" href="/collections/block.html">Text Block</a>
  59. </div>
  60. </div>
  61. <div class="item">
  62. <a href="/module.html"><b>UI Modules</b></a>
  63. <div class="menu">
  64. <a class="item" href="/modules/shape.html">Shape</a>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="ui fixed transparent contrasting main menu">
  69. <div class="container">
  70. <div class="title item">
  71. <b>UI Collection:</b> Table
  72. </div>
  73. <div class="icon previous link item">
  74. <a href="/collections/menu.html"><i class="icon left-open"></i></a>
  75. </div>
  76. <div class="section dropdown item">
  77. 4 of 5
  78. <div class="menu">
  79. <div class="item">
  80. <a href="/collections/form.html">1. Form</a>
  81. </div>
  82. <div class="item">
  83. <a href="/collections/grid.html">2. Grid</a>
  84. </div>
  85. <div class="item">
  86. <a href="/collections/menu.html">3. Menu</a>
  87. </div>
  88. <div class="active item">
  89. <a href="/collections/table.html">4. Table</a>
  90. </div>
  91. <div class="item">
  92. <a href="/collections/block.html">5. Text Block</a>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="icon next link item">
  97. <a href="/collections/block.html"><i class="icon right-open"></i></a>
  98. </div>
  99. <div class="right menu">
  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 tint"></i> Theme
  105. <div class="theme menu">
  106. <div class="active item" data-theme="flat">Flat</div>
  107. <div class="item" data-theme="shaded">Shaded</div>
  108. <div class="item" data-theme="classic">Classic</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 large blue sidebar button"><i class="icon th-list"></i> Menu</div>
  116. </div>
  117. <div class="segment">
  118. <div class="container">
  119. <h1>Tables</h1>
  120. <p>Tables are useful for displaying collections of tuples.</p>
  121. <p>
  122. Tables consist of an optional table header, content, and table footer. They may be formatted to show numeric content or for rows of text.
  123. </p>
  124. <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>
  125. </div>
  126. </div>
  127. <div class="main container">
  128. <div class="peek">
  129. <div class="ui vertical pointing link menu">
  130. <div class="active item">Standard</div>
  131. <div class="item">States</div>
  132. <div class="item">Variations</div>
  133. </div>
  134. </div>
  135. <h2>Standard</h2>
  136. <div class="example">
  137. <h4>Table</h4>
  138. <p>A standard table</p>
  139. <table class="ui table">
  140. <thead>
  141. <th>Name</th>
  142. <th>Status</th>
  143. <th>Notes</th>
  144. </thead>
  145. <tbody>
  146. <tr>
  147. <td>John</td>
  148. <td>Approved</td>
  149. <td>None</td>
  150. </tr>
  151. <tr>
  152. <td>Jamie</td>
  153. <td>Approved</td>
  154. <td>Requires call</td>
  155. </tr>
  156. <tr>
  157. <td>Jill</td>
  158. <td>Denied</td>
  159. <td>None</td>
  160. </tr>
  161. </tbody>
  162. <tfoot>
  163. <th colspan="3">
  164. <div class="ui blue button"><i class="icon plus-circle"></i> Add User</div>
  165. </th>
  166. </tfoot>
  167. </table>
  168. </div>
  169. <h2>States</h2>
  170. <div class="example">
  171. <h4>Positive / Negative</h4>
  172. <p>A cell may let a user know whether a value is good or bad:</p>
  173. <table class="ui grid table">
  174. <thead>
  175. <th>Name</th>
  176. <th>Status</th>
  177. <th>Notes</th>
  178. </thead>
  179. <tbody>
  180. <tr>
  181. <td>No Name Specified</td>
  182. <td>Unknown</td>
  183. <td>None</td>
  184. </tr>
  185. <tr class="positive">
  186. <td>Jimmy</td>
  187. <td><i class="icon check"></i> Approved</td>
  188. <td>None</td>
  189. </tr>
  190. <tr>
  191. <td>Jamie</td>
  192. <td>Unknown</td>
  193. <td class="negative"><i class="icon close"></i> Requires call</td>
  194. </tr>
  195. <tr>
  196. <td>Jill</td>
  197. <td>Unknown</td>
  198. <td>None</td>
  199. </tr>
  200. </tbody>
  201. </table>
  202. </div>
  203. <h3>Cells</h3>
  204. <div class="example">
  205. <h4>Error</h4>
  206. <p>A cell or row may alert the user to an error or a negative value:</p>
  207. <table class="ui grid table">
  208. <thead>
  209. <th>Name</th>
  210. <th>Status</th>
  211. <th>Notes</th>
  212. </thead>
  213. <tbody>
  214. <tr>
  215. <td>No Name Specified</td>
  216. <td>Approved</td>
  217. <td>None</td>
  218. </tr>
  219. <tr class="error">
  220. <td>Jimmy</td>
  221. <td><i class="icon attention-circle"></i> Cannot pull data</td>
  222. <td>None</td>
  223. </tr>
  224. <tr>
  225. <td>Jamie</td>
  226. <td>Approved</td>
  227. <td class="error"><i class="icon attention-circle"></i> Classified</td>
  228. </tr>
  229. <tr>
  230. <td>Jill</td>
  231. <td>Approved</td>
  232. <td>None</td>
  233. </tr>
  234. </tbody>
  235. </table>
  236. </div>
  237. <div class="example">
  238. <h4>Warning</h4>
  239. <p>A cell or row may warn a user:</p>
  240. <table class="ui grid table">
  241. <thead>
  242. <th>Name</th>
  243. <th>Status</th>
  244. <th>Notes</th>
  245. </thead>
  246. <tbody>
  247. <tr>
  248. <td>No Name Specified</td>
  249. <td>Unknown</td>
  250. <td>None</td>
  251. </tr>
  252. <tr class="warning">
  253. <td>Jimmy</td>
  254. <td><i class="icon info"></i> Requires Action</td>
  255. <td>None</td>
  256. </tr>
  257. <tr>
  258. <td>Jamie</td>
  259. <td>Unknown</td>
  260. <td class="warning"><i class="icon info"></i> Hostile</td>
  261. </tr>
  262. <tr>
  263. <td>Jill</td>
  264. <td>Unknown</td>
  265. <td>None</td>
  266. </tr>
  267. </tbody>
  268. </table>
  269. </div>
  270. <div class="example">
  271. <h4>Active</h4>
  272. <p>A cell or row can be active:</p>
  273. <table class="ui grid table">
  274. <thead>
  275. <th>Name</th>
  276. <th>Status</th>
  277. <th>Notes</th>
  278. </thead>
  279. <tbody>
  280. <tr>
  281. <td>Jamie</td>
  282. <td>Approved</td>
  283. <td>Requires call</td>
  284. </tr>
  285. <tr class="active">
  286. <td>John</td>
  287. <td>Selected</td>
  288. <td>None</td>
  289. </tr>
  290. <tr>
  291. <td>Jamie</td>
  292. <td>Approved</td>
  293. <td>Requires call</td>
  294. </tr>
  295. <tr>
  296. <td class="active">Jill</td>
  297. <td>Approved</td>
  298. <td>None</td>
  299. </tr>
  300. </tbody>
  301. </table>
  302. <div class="example">
  303. <h4>Disabled</h4>
  304. <p>A cell can be disabled:</p>
  305. <table class="ui grid table">
  306. <thead>
  307. <th>Name</th>
  308. <th>Status</th>
  309. <th>Notes</th>
  310. </thead>
  311. <tbody>
  312. <tr class="disabled">
  313. <td>Jamie</td>
  314. <td>Approved</td>
  315. <td>Requires call</td>
  316. </tr>
  317. <tr>
  318. <td>John</td>
  319. <td>Selected</td>
  320. <td>None</td>
  321. </tr>
  322. <tr>
  323. <td>Jamie</td>
  324. <td>Approved</td>
  325. <td>Requires call</td>
  326. </tr>
  327. <tr>
  328. <td class="disabled">Jill</td>
  329. <td>Approved</td>
  330. <td>None</td>
  331. </tr>
  332. </tbody>
  333. </table>
  334. </div>
  335. <h2>Variations</h2>
  336. <div class="example">
  337. <h4>Collapsing</h4>
  338. <p>By default tables take the size of their container. A collapsing takes up only as much space as its rows.</p>
  339. <table class="ui grid table collapsing">
  340. <thead>
  341. <th>Name</th>
  342. <th>Status</th>
  343. <th>Notes</th>
  344. </thead>
  345. <tbody>
  346. <tr>
  347. <td>John</td>
  348. <td>Approved</td>
  349. <td>None</td>
  350. </tr>
  351. <tr>
  352. <td>Jamie</td>
  353. <td>Approved</td>
  354. <td>Requires call</td>
  355. </tr>
  356. <tr>
  357. <td>Jill</td>
  358. <td>Denied</td>
  359. <td>None</td>
  360. </tr>
  361. </tbody>
  362. <tfoot>
  363. <th>3 People</th>
  364. <th>2 Approved</th>
  365. <th></th>
  366. </tfoot>
  367. </table>
  368. </div>
  369. <div class="example">
  370. <h4>Grid</h4>
  371. <p>A table may have a grid to help differentiate cells</p>
  372. <table class="ui grid table">
  373. <thead>
  374. <th>Name</th>
  375. <th>Status</th>
  376. <th>Notes</th>
  377. </thead>
  378. <tbody>
  379. <tr>
  380. <td>John</td>
  381. <td>Approved</td>
  382. <td>None</td>
  383. </tr>
  384. <tr>
  385. <td>Jamie</td>
  386. <td>Approved</td>
  387. <td>Requires call</td>
  388. </tr>
  389. <tr>
  390. <td>Jill</td>
  391. <td>Denied</td>
  392. <td>None</td>
  393. </tr>
  394. </tbody>
  395. <tfoot>
  396. <th>3 People</th>
  397. <th>2 Approved</th>
  398. <th></th>
  399. </tfoot>
  400. </table>
  401. </div>
  402. <div class="example">
  403. <h4>Sortable</h4>
  404. <p>A table may allow a user to sort contents by clicking on a table header.</p>
  405. <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>
  406. <table class="ui sortable grid table">
  407. <thead>
  408. <th>Name</th>
  409. <th>Status</th>
  410. <th>Notes</th>
  411. </thead>
  412. <tbody>
  413. <tr>
  414. <td>John</td>
  415. <td>No Action</td>
  416. <td>None</td>
  417. </tr>
  418. <tr>
  419. <td>Jamie</td>
  420. <td class="positive">Approved</td>
  421. <td class="warning">Requires call</td>
  422. </tr>
  423. <tr>
  424. <td>Jill</td>
  425. <td class="negative">Denied</td>
  426. <td>None</td>
  427. </tr>
  428. </tbody>
  429. <tfoot>
  430. <th>3 People</th>
  431. <th>2 Approved</th>
  432. <th></th>
  433. </tfoot>
  434. </table>
  435. </div>
  436. <div class="example">
  437. <h4>Padded</h4>
  438. <p>A table may sometimes need to be more padded for legibility</p>
  439. <table class="ui padded grid table">
  440. <thead>
  441. <th>Name</th>
  442. <th>Status</th>
  443. <th>Notes</th>
  444. </thead>
  445. <tbody>
  446. <tr>
  447. <td>John</td>
  448. <td>Approved</td>
  449. <td>He is a very nice guy and I enjoyed talking to him on the telephone. I hope we get to talk again.</td>
  450. </tr>
  451. <tr>
  452. <td>Jamie</td>
  453. <td>Approved</td>
  454. <td>Jamie was not interested in purchasing our product.</td>
  455. </tr>
  456. </tbody>
  457. </table>
  458. </div>
  459. <div class="example">
  460. <h4>Compact</h4>
  461. <p>A table may sometimes need to be more compact to make more rows visible at a time</p>
  462. <table class="ui compact grid table">
  463. <thead>
  464. <th>Name</th>
  465. <th>Status</th>
  466. <th>Notes</th>
  467. </thead>
  468. <tbody>
  469. <tr>
  470. <td>John</td>
  471. <td>Approved</td>
  472. <td>None</td>
  473. </tr>
  474. <tr>
  475. <td>Jamie</td>
  476. <td>Approved</td>
  477. <td>Requires call</td>
  478. </tr>
  479. <tr>
  480. <td>John</td>
  481. <td>Approved</td>
  482. <td>None</td>
  483. </tr>
  484. <tr>
  485. <td>Jamie</td>
  486. <td>Approved</td>
  487. <td>Requires call</td>
  488. </tr>
  489. <tr>
  490. <td>John</td>
  491. <td>Approved</td>
  492. <td>None</td>
  493. </tr>
  494. <tr>
  495. <td>Jamie</td>
  496. <td>Approved</td>
  497. <td>Requires call</td>
  498. </tr>
  499. <tr>
  500. <td>John</td>
  501. <td>Approved</td>
  502. <td>None</td>
  503. </tr>
  504. <tr>
  505. <td>Jamie</td>
  506. <td>Approved</td>
  507. <td>Requires call</td>
  508. </tr>
  509. </tbody>
  510. </table>
  511. </div>
  512. <div class="example">
  513. <h4>Size</h4>
  514. <p>A table can also be small or large</p>
  515. <table class="ui small table">
  516. <thead>
  517. <th>Name</th>
  518. <th>Status</th>
  519. <th>Notes</th>
  520. </thead>
  521. <tbody>
  522. <tr>
  523. <td>John</td>
  524. <td>Approved</td>
  525. <td>None</td>
  526. </tr>
  527. <tr>
  528. <td>Jamie</td>
  529. <td>Approved</td>
  530. <td>Requires call</td>
  531. </tr>
  532. <tr>
  533. <td>Jill</td>
  534. <td>Denied</td>
  535. <td>None</td>
  536. </tr>
  537. </tbody>
  538. <tfoot>
  539. <th>3 People</th>
  540. <th>2 Approved</th>
  541. <th></th>
  542. </tfoot>
  543. </table>
  544. <br><br>
  545. <table class="ui large table">
  546. <thead>
  547. <th>Name</th>
  548. <th>Status</th>
  549. <th>Notes</th>
  550. </thead>
  551. <tbody>
  552. <tr>
  553. <td>John</td>
  554. <td>Approved</td>
  555. <td>None</td>
  556. </tr>
  557. <tr>
  558. <td>Jamie</td>
  559. <td>Approved</td>
  560. <td>Requires call</td>
  561. </tr>
  562. <tr>
  563. <td>Jill</td>
  564. <td>Denied</td>
  565. <td>None</td>
  566. </tr>
  567. </tbody>
  568. <tfoot>
  569. <th>3 People</th>
  570. <th>2 Approved</th>
  571. <th></th>
  572. </tfoot>
  573. </table>
  574. </div>
  575. </div>
  576. </body>
  577. </html>
  578. </body>
  579. </html>