Tables are used to make large volumes of data easy to understand and to access.
API status: | general |
---|---|
Included in AUI core? | Yes. You do not need to explicitly require the web resource key. |
Web resource key: | com.atlassian.auiplugin:ajs
|
AMD Module key: | N/A |
Experimental since: | 2.2 |
# | First name | Last name | Username |
---|---|---|---|
1 | Matt | Bond | mbond |
2 | Ross | Chaldecott | rchaldecott |
3 | Henry | Tapia | htapia |
The core AUI Tables API is markup-only. All it requires is some HTML on the page, the CSS will automatically be applied. There is no JavaScript to configure or set up (note extensions such as Sortable Tables do require JavaScript).
The following example shows the markup pattern required for AUI Tables.
<table class="aui">
<thead>
<tr>
<th id="name">Name</th>
<th id="type">Type</th>
<th id="order">Order</th>
<th id="action">Action</th>
</tr>
</thead>
<tbody>
<tr>
<td headers="name">Default</td>
<td headers="type">Internal Directory</td>
<td class="order" headers="order">
<ul class="menu">
<li>
<a class="down" href="#">Down</a>
</li>
</ul>
</td>
<td class="action" headers="action">
<ul class="menu">
<li>
<a href="#">An Action</a>
</li>
</ul>
</td>
</tr>
<tr>
<td headers="name">Corporate LDAP</td>
<td headers="type">Microsoft Active Directory</td>
<td class="order" headers="order">
<ul class="menu">
<li>
<a class="up" href="#">Up</a>
</li>
<li>
<a class="down" href="#">Down</a>
</li>
</ul>
</td>
<td class="action" headers="action">
<ul class="menu">
<li>
<a href="#">An Action</a>
</li>
<li>
<a href="#">Another Action</a>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
Correct table element usage: