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.
 
 
 

638 lines
17 KiB

<!DOCTYPE html>
<head>
<!-- Standard Meta -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width" />
<!-- Site Properities -->
<meta http-equiv="X-Powered-By" content="DocPad v6.32.0"/>
<title>Table | Semantic UI</title>
<meta name="description" content="Semantic empowers designers and developers by creating a shared vocabulary for UI." />
<meta name="keywords" content="html5, ui, library, framework, javascript" />
<link rel="stylesheet" type="text/css" href="/stylesheets/reset.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/icons.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/button.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/header.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/label.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/divider.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/block.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/segment.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/grid.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/table.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/form.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/menu.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/modules/shape.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/modules/checkbox.css">
<link rel="stylesheet" type="text/css" href="/stylesheets/library/sidr.css">
<link rel="stylesheet" type="text/css" href="/stylesheets/semantic.css">
<link rel="stylesheet" type="text/css" href="/stylesheets/shape.css">
<script src="/javascript/library/jquery.js"></script>
<script src="/javascript/library/ace/ace.js"></script>
<script src="/javascript/library/sidr.js"></script>
<script src="/javascript/library/waypoints.js"></script>
<script src="/ui/flat/modules/behavior/state.js"></script>
<script src="/ui/flat/modules/shape.js"></script>
<script src="/ui/flat/modules/checkbox.js"></script>
<script src="/javascript/semantic.js"></script>
<script src="/javascript/shape.js"></script>
</head>
<body id="example">
<div class="ui large vertical menu" id="menu">
<div class="header item">Table of Contents</div>
<div class="item"><a href="/index.html"><b>Introduction</b></a></div>
<div class="item"><a href="/download.html"><b>Download</b></a></div>
<div class="item">
<a href="/element.html"><b>UI Elements</b></a>
<div class="menu">
<a class="item" href="/elements/button.html">Button</a>
<a class="item" href="/elements/label.html">Label</a>
</div>
</div>
<div class="item">
<a href="/collection.html"><b>UI Collections</b></a>
<div class="menu">
<a class="item" href="/collections/form.html">Form</a>
<a class="item" href="/collections/grid.html">Grid</a>
<a class="item" href="/collections/menu.html">Menu</a>
<a class="active item" href="/collections/table.html">Table</a>
<a class="item" href="/collections/block.html">Text Block</a>
</div>
</div>
<div class="item">
<a href="/module.html"><b>UI Modules</b></a>
<div class="menu">
<a class="item" href="/modules/shape.html">Shape</a>
</div>
</div>
</div>
<div class="ui fixed transparent contrasting main menu">
<div class="container">
<div class="title item">
<b>UI Collection:</b> Table
</div>
<div class="icon previous link item">
<a href="/collections/menu.html"><i class="icon left-open"></i></a>
</div>
<div class="section dropdown item">
4 of 5
<div class="menu">
<div class="item">
<a href="/collections/form.html">1. Form</a>
</div>
<div class="item">
<a href="/collections/grid.html">2. Grid</a>
</div>
<div class="item">
<a href="/collections/menu.html">3. Menu</a>
</div>
<div class="active item">
<a href="/collections/table.html">4. Table</a>
</div>
<div class="item">
<a href="/collections/block.html">5. Text Block</a>
</div>
</div>
</div>
<div class="icon next link item">
<a href="/collections/block.html"><i class="icon right-open"></i></a>
</div>
<div class="right menu">
<a class="item" href="https://github.com/quirkyinc/semantic">
<i class="icon github"></i>
</a>
<div class="dropdown item">
<i class="icon tint"></i> Theme
<div class="theme menu">
<div class="active item" data-theme="flat">Flat</div>
<div class="item" data-theme="shaded">Shaded</div>
<div class="item" data-theme="classic">Classic</div>
</div>
</div>
</div>
</div>
</div>
<div class="ui huge left attached vertical side buttons">
<div class="ui large blue sidebar button"><i class="icon th-list"></i> Menu</div>
</div>
<div class="segment">
<div class="container">
<h1>Tables</h1>
<p>Tables are useful for displaying collections of tuples.</p>
<p>
Tables consist of an optional table header, content, and table footer. They may be formatted to show numeric content or for rows of text.
</p>
<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>
</div>
</div>
<div class="main container">
<div class="peek">
<div class="ui vertical pointing link menu">
<div class="active item">Standard</div>
<div class="item">States</div>
<div class="item">Variations</div>
</div>
</div>
<h2>Standard</h2>
<div class="example">
<h4>Table</h4>
<p>A standard table</p>
<table class="ui table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Approved</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr>
<td>Jill</td>
<td>Denied</td>
<td>None</td>
</tr>
</tbody>
<tfoot>
<th colspan="3">
<div class="ui blue button"><i class="icon plus-circle"></i> Add User</div>
</th>
</tfoot>
</table>
</div>
<h2>States</h2>
<div class="example">
<h4>Positive / Negative</h4>
<p>A cell may let a user know whether a value is good or bad:</p>
<table class="ui grid table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>No Name Specified</td>
<td>Unknown</td>
<td>None</td>
</tr>
<tr class="positive">
<td>Jimmy</td>
<td><i class="icon check"></i> Approved</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Unknown</td>
<td class="negative"><i class="icon close"></i> Requires call</td>
</tr>
<tr>
<td>Jill</td>
<td>Unknown</td>
<td>None</td>
</tr>
</tbody>
</table>
</div>
<h3>Cells</h3>
<div class="example">
<h4>Error</h4>
<p>A cell or row may alert the user to an error or a negative value:</p>
<table class="ui grid table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>No Name Specified</td>
<td>Approved</td>
<td>None</td>
</tr>
<tr class="error">
<td>Jimmy</td>
<td><i class="icon attention-circle"></i> Cannot pull data</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td class="error"><i class="icon attention-circle"></i> Classified</td>
</tr>
<tr>
<td>Jill</td>
<td>Approved</td>
<td>None</td>
</tr>
</tbody>
</table>
</div>
<div class="example">
<h4>Warning</h4>
<p>A cell or row may warn a user:</p>
<table class="ui grid table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>No Name Specified</td>
<td>Unknown</td>
<td>None</td>
</tr>
<tr class="warning">
<td>Jimmy</td>
<td><i class="icon info"></i> Requires Action</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Unknown</td>
<td class="warning"><i class="icon info"></i> Hostile</td>
</tr>
<tr>
<td>Jill</td>
<td>Unknown</td>
<td>None</td>
</tr>
</tbody>
</table>
</div>
<div class="example">
<h4>Active</h4>
<p>A cell or row can be active:</p>
<table class="ui grid table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr class="active">
<td>John</td>
<td>Selected</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr>
<td class="active">Jill</td>
<td>Approved</td>
<td>None</td>
</tr>
</tbody>
</table>
<div class="example">
<h4>Disabled</h4>
<p>A cell can be disabled:</p>
<table class="ui grid table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr class="disabled">
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr>
<td>John</td>
<td>Selected</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr>
<td class="disabled">Jill</td>
<td>Approved</td>
<td>None</td>
</tr>
</tbody>
</table>
</div>
<h2>Variations</h2>
<div class="example">
<h4>Collapsing</h4>
<p>By default tables take the size of their container. A collapsing takes up only as much space as its rows.</p>
<table class="ui grid table collapsing">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Approved</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr>
<td>Jill</td>
<td>Denied</td>
<td>None</td>
</tr>
</tbody>
<tfoot>
<th>3 People</th>
<th>2 Approved</th>
<th></th>
</tfoot>
</table>
</div>
<div class="example">
<h4>Grid</h4>
<p>A table may have a grid to help differentiate cells</p>
<table class="ui grid table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Approved</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr>
<td>Jill</td>
<td>Denied</td>
<td>None</td>
</tr>
</tbody>
<tfoot>
<th>3 People</th>
<th>2 Approved</th>
<th></th>
</tfoot>
</table>
</div>
<div class="example">
<h4>Sortable</h4>
<p>A table may allow a user to sort contents by clicking on a table header.</p>
<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>
<table class="ui sortable grid table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>John</td>
<td>No Action</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td class="positive">Approved</td>
<td class="warning">Requires call</td>
</tr>
<tr>
<td>Jill</td>
<td class="negative">Denied</td>
<td>None</td>
</tr>
</tbody>
<tfoot>
<th>3 People</th>
<th>2 Approved</th>
<th></th>
</tfoot>
</table>
</div>
<div class="example">
<h4>Padded</h4>
<p>A table may sometimes need to be more padded for legibility</p>
<table class="ui padded grid table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Approved</td>
<td>He is a very nice guy and I enjoyed talking to him on the telephone. I hope we get to talk again.</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Jamie was not interested in purchasing our product.</td>
</tr>
</tbody>
</table>
</div>
<div class="example">
<h4>Compact</h4>
<p>A table may sometimes need to be more compact to make more rows visible at a time</p>
<table class="ui compact grid table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Approved</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr>
<td>John</td>
<td>Approved</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr>
<td>John</td>
<td>Approved</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr>
<td>John</td>
<td>Approved</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
</tbody>
</table>
</div>
<div class="example">
<h4>Size</h4>
<p>A table can also be small or large</p>
<table class="ui small table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Approved</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr>
<td>Jill</td>
<td>Denied</td>
<td>None</td>
</tr>
</tbody>
<tfoot>
<th>3 People</th>
<th>2 Approved</th>
<th></th>
</tfoot>
</table>
<br><br>
<table class="ui large table">
<thead>
<th>Name</th>
<th>Status</th>
<th>Notes</th>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Approved</td>
<td>None</td>
</tr>
<tr>
<td>Jamie</td>
<td>Approved</td>
<td>Requires call</td>
</tr>
<tr>
<td>Jill</td>
<td>Denied</td>
<td>None</td>
</tr>
</tbody>
<tfoot>
<th>3 People</th>
<th>2 Approved</th>
<th></th>
</tfoot>
</table>
</div>
</div>
</body>
</html>
</body>
</html>