Table

Plain table markup (thead, tbody, th, td) styled directly. No classes; the header row and row hover come for free.

A data table

When a table is wider than its column, wrap it in a scroll area so it scrolls sideways on its own instead of pushing the page wider.

IDLoginEmailGroupAdded
1adminadmin@example.comSuperuser2024-01-15
2adaada@example.comEditors2024-02-20
3linuslinus@example.comEditors2024-03-02
4gracegrace@example.comViewers2024-03-19
<div role="region" aria-label="Users" tabindex="0">
  <table>
    <thead><tr><th>ID</th><th>Login</th><th>Email</th><th>Group</th><th>Added</th></tr></thead>
    <tbody>
      <tr><td>1</td><td>admin</td><td>admin@example.com</td><td>Superuser</td><td>2024-01-15</td></tr>
      <tr><td>2</td><td>ada</td><td>ada@example.com</td><td>Editors</td><td>2024-02-20</td></tr>
      …
    </tbody>
  </table>
</div>
A table of users in a scroll area

With actions

Cells hold any inline content: a chip for the status, and small buttons in a buttons row for the actions.

LoginGroupStatusActions
adminSuperuseractive
Edit
adaEditorsactive
Edit
linusEditorsinvited
Edit
<div role="region" aria-label="Users with actions" tabindex="0">
  <table>
    <thead><tr><th>Login</th><th>Group</th><th>Status</th><th>Actions</th></tr></thead>
    <tbody>
      <tr>
        <td>admin</td>
        <td>Superuser</td>
        <td><span class="chip teal">active</span></td>
        <td>
          <div class="buttons">
            <a class="button small" href="users/admin/">Edit</a>
            <button class="ghost small">Delete</button>
          </div>
        </td>
      </tr>
      …
    </tbody>
  </table>
</div>
A status chip and row actions in each row