Unsorted
Both arrows: people can sort by this column.
Rows and columns of data that people read and compare, like published figures, fees or office details. Not a dashboard or an admin tool.
Updated
Passport applications by office, September (example data)
| Ikoyi | Lagos | 1,284 | 1,190 | 9 |
|---|---|---|---|---|
| Garki | FCT | 1,102 | 1,047 | 7 |
| Port Harcourt | Rivers | 876 | 812 | 11 |
| Kano | Kano | 743 | 701 | 8 |
| Enugu | Enugu | 512 | 488 | 6 |
| Ibadan | Oyo | 498 | 455 | 10 |
Sorted by Applications, descending
Data table
Paste this markup in your page content
<div class="nds-data-table nds-data-table--sortable"> <p class="nds-data-table__caption" id="data-table-demo-caption"> Passport applications by office, September (example data) </p> <div class="nds-data-table__scroll" role="region" aria-labelledby="data-table-demo-caption" tabindex="0"> <table class="nds-data-table__table"> <caption class="nds-sr-only"> Passport applications by office, September (example data) </caption> <colgroup> <col class="nds-data-table__col-office" /> <col class="nds-data-table__col-state" /> <col class="nds-data-table__col-applications" /> <col class="nds-data-table__col-approved" /> <col class="nds-data-table__col-average-wait" /> </colgroup> <thead> <tr> <th scope="col" class="nds-data-table__col--text nds-data-table__col--lead"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Office </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--text"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> State </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--numeric" aria-sort="descending"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Applications </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--sorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-desc"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--numeric"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Approved </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--numeric"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Average wait (days) </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> </tr> </thead> <tbody> <tr> <th scope="row"> Ikoyi </th> <td> Lagos </td> <td class="nds-data-table__cell--numeric"> 1,284 </td> <td class="nds-data-table__cell--numeric"> 1,190 </td> <td class="nds-data-table__cell--numeric"> 9 </td> </tr> <tr> <th scope="row"> Garki </th> <td> FCT </td> <td class="nds-data-table__cell--numeric"> 1,102 </td> <td class="nds-data-table__cell--numeric"> 1,047 </td> <td class="nds-data-table__cell--numeric"> 7 </td> </tr> <tr> <th scope="row"> Port Harcourt </th> <td> Rivers </td> <td class="nds-data-table__cell--numeric"> 876 </td> <td class="nds-data-table__cell--numeric"> 812 </td> <td class="nds-data-table__cell--numeric"> 11 </td> </tr> <tr> <th scope="row"> Kano </th> <td> Kano </td> <td class="nds-data-table__cell--numeric"> 743 </td> <td class="nds-data-table__cell--numeric"> 701 </td> <td class="nds-data-table__cell--numeric"> 8 </td> </tr> <tr> <th scope="row"> Enugu </th> <td> Enugu </td> <td class="nds-data-table__cell--numeric"> 512 </td> <td class="nds-data-table__cell--numeric"> 488 </td> <td class="nds-data-table__cell--numeric"> 6 </td> </tr> <tr> <th scope="row"> Ibadan </th> <td> Oyo </td> <td class="nds-data-table__cell--numeric"> 498 </td> <td class="nds-data-table__cell--numeric"> 455 </td> <td class="nds-data-table__cell--numeric"> 10 </td> </tr> </tbody> </table> </div> <p class="nds-sr-only" id="data-table-sort-status" aria-live="polite" aria-atomic="true"> Sorted by Applications, descending </p></div> WordPress block (HTML mode)
<!-- wp:nds/data-table {} --><div class="nds-data-table nds-data-table--sortable"> <p class="nds-data-table__caption" id="data-table-demo-caption"> Passport applications by office, September (example data) </p> <div class="nds-data-table__scroll" role="region" aria-labelledby="data-table-demo-caption" tabindex="0"> <table class="nds-data-table__table"> <caption class="nds-sr-only"> Passport applications by office, September (example data) </caption> <colgroup> <col class="nds-data-table__col-office" /> <col class="nds-data-table__col-state" /> <col class="nds-data-table__col-applications" /> <col class="nds-data-table__col-approved" /> <col class="nds-data-table__col-average-wait" /> </colgroup> <thead> <tr> <th scope="col" class="nds-data-table__col--text nds-data-table__col--lead"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Office </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--text"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> State </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--numeric" aria-sort="descending"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Applications </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--sorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-desc"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--numeric"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Approved </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--numeric"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Average wait (days) </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> </tr> </thead> <tbody> <tr> <th scope="row"> Ikoyi </th> <td> Lagos </td> <td class="nds-data-table__cell--numeric"> 1,284 </td> <td class="nds-data-table__cell--numeric"> 1,190 </td> <td class="nds-data-table__cell--numeric"> 9 </td> </tr> <tr> <th scope="row"> Garki </th> <td> FCT </td> <td class="nds-data-table__cell--numeric"> 1,102 </td> <td class="nds-data-table__cell--numeric"> 1,047 </td> <td class="nds-data-table__cell--numeric"> 7 </td> </tr> <tr> <th scope="row"> Port Harcourt </th> <td> Rivers </td> <td class="nds-data-table__cell--numeric"> 876 </td> <td class="nds-data-table__cell--numeric"> 812 </td> <td class="nds-data-table__cell--numeric"> 11 </td> </tr> <tr> <th scope="row"> Kano </th> <td> Kano </td> <td class="nds-data-table__cell--numeric"> 743 </td> <td class="nds-data-table__cell--numeric"> 701 </td> <td class="nds-data-table__cell--numeric"> 8 </td> </tr> <tr> <th scope="row"> Enugu </th> <td> Enugu </td> <td class="nds-data-table__cell--numeric"> 512 </td> <td class="nds-data-table__cell--numeric"> 488 </td> <td class="nds-data-table__cell--numeric"> 6 </td> </tr> <tr> <th scope="row"> Ibadan </th> <td> Oyo </td> <td class="nds-data-table__cell--numeric"> 498 </td> <td class="nds-data-table__cell--numeric"> 455 </td> <td class="nds-data-table__cell--numeric"> 10 </td> </tr> </tbody> </table> </div> <p class="nds-sr-only" id="data-table-sort-status" aria-live="polite" aria-atomic="true"> Sorted by Applications, descending </p></div><!-- /wp:nds/data-table --> Usage
import { DataTable } from "@nigerian-design-standards/react";<DataTable caption="Passport applications by office" variant="sortable" sortBy="applications"/> Blade
<?php echo '<div class="nds-data-table nds-data-table--sortable"> <p class="nds-data-table__caption" id="data-table-demo-caption"> Passport applications by office, September (example data) </p> <div class="nds-data-table__scroll" role="region" aria-labelledby="data-table-demo-caption" tabindex="0"> <table class="nds-data-table__table"> <caption class="nds-sr-only"> Passport applications by office, September (example data) </caption> <colgroup> <col class="nds-data-table__col-office" /> <col class="nds-data-table__col-state" /> <col class="nds-data-table__col-applications" /> <col class="nds-data-table__col-approved" /> <col class="nds-data-table__col-average-wait" /> </colgroup> <thead> <tr> <th scope="col" class="nds-data-table__col--text nds-data-table__col--lead"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Office </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--text"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> State </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--numeric" aria-sort="descending"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Applications </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--sorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-desc"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--numeric"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Approved </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> <th scope="col" class="nds-data-table__col--numeric"> <button type="button" class="nds-data-table__sort"> <span class="nds-data-table__sort-label"> Average wait (days) </span> <svg class="nds-data-table__sort-icon nds-data-table__sort-icon--unsorted" focusable="false" aria-hidden="true"> <use href="#nds-icon-sort-both"> </use> </svg> </button> </th> </tr> </thead> <tbody> <tr> <th scope="row"> Ikoyi </th> <td> Lagos </td> <td class="nds-data-table__cell--numeric"> 1,284 </td> <td class="nds-data-table__cell--numeric"> 1,190 </td> <td class="nds-data-table__cell--numeric"> 9 </td> </tr> <tr> <th scope="row"> Garki </th> <td> FCT </td> <td class="nds-data-table__cell--numeric"> 1,102 </td> <td class="nds-data-table__cell--numeric"> 1,047 </td> <td class="nds-data-table__cell--numeric"> 7 </td> </tr> <tr> <th scope="row"> Port Harcourt </th> <td> Rivers </td> <td class="nds-data-table__cell--numeric"> 876 </td> <td class="nds-data-table__cell--numeric"> 812 </td> <td class="nds-data-table__cell--numeric"> 11 </td> </tr> <tr> <th scope="row"> Kano </th> <td> Kano </td> <td class="nds-data-table__cell--numeric"> 743 </td> <td class="nds-data-table__cell--numeric"> 701 </td> <td class="nds-data-table__cell--numeric"> 8 </td> </tr> <tr> <th scope="row"> Enugu </th> <td> Enugu </td> <td class="nds-data-table__cell--numeric"> 512 </td> <td class="nds-data-table__cell--numeric"> 488 </td> <td class="nds-data-table__cell--numeric"> 6 </td> </tr> <tr> <th scope="row"> Ibadan </th> <td> Oyo </td> <td class="nds-data-table__cell--numeric"> 498 </td> <td class="nds-data-table__cell--numeric"> 455 </td> <td class="nds-data-table__cell--numeric"> 10 </td> </tr> </tbody> </table> </div> <p class="nds-sr-only" id="data-table-sort-status" aria-live="polite" aria-atomic="true"> Sorted by Applications, descending </p></div>'; ?> Use a data table when people need to compare values across rows or columns, like fees by passport type or waiting times by office. It’s for content pages, not dashboards or admin tools.
Three variants: Default, Sortable and Mobile. In a sortable table each header is a button, with these states.
Both arrows: people can sort by this column.
One arrow shows the direction. aria-sort says it in code.
A tint and an underline.
The focus ring on the header button.
The properties of the data table. The same in HTML, WordPress and React.
| Property | Type | Possible values | Description |
|---|---|---|---|
| caption | string |
| Required. Says what the table shows, and when. It names the table. |
| variant | string |
| Mobile is automatic: below the tablet breakpoint the table scrolls sideways. |
| sortBy | string |
| Sortable only. Start sorted on a useful column. |
| download | string |
| Link to the full data. Offer it for tables over about 50 rows. |
In code, use a <table> with a <caption>, <th scope="col"> for the header row and <th scope="row"> for the first column. Don’t use role="grid": this is a reading table. On small screens, wrap it in <div role="region" aria-labelledby tabindex="0"> so it can
scroll sideways.
| Part | Token | Contrast on the page |
|---|---|---|
| Container | Caption · Title/medium · text/primary | 17.6:1 |
| Header row | Body/medium-emphasized, with a 2px border/dark line under it | 17.6:1 |
| Cells | Body/medium · text/primary · spacing/150 and spacing/200 | 17.6:1 |
| Row lines | border/default 1px | 1.5:1, decorative |
| Sort arrows | text/secondary for unsorted · text/primary for sorted | 6.6:1 · 17.6:1 |
| Focus ring | Input Keyboard Focus · border/focus 3px | 4.5:1 |
Write “Not available” for a missing value, and add a note that says why.
Don’t leave a cell blank, or use a dash or 0.
How a data table sits on a page.
How to write captions, headers and cells.
“Passport fees by type, 2026”. Say what and when.
“Average wait (days)”, not “days” in every cell.
“Not available [note 2]”, never a blank, a dash or 0.
“[note 1]”, not superscript, so it survives copy and paste.
Source: Nigeria Immigration Service. Last updated 30 September 2026.
“Form A for Lagos”, not “Download” down the column.
| Write | Don’t write | Why |
|---|---|---|
| Passport fees by type, 2026 | Table 1 | Says what and when. |
| Average wait (days) | Average wait | Gives the unit. |
| Not available [note 2] | — | Says why a value is missing. |
| Form A for Lagos | Download | Names the row. |
| Open | A green dot | Words, not colour alone. |
A reading table, not a widget. Screen readers announce the row and column header with every value.
| Key | What it does |
|---|---|
| Tab | Moves through sortable header buttons, left to right. Cells are never focusable. |
| Shift + Tab | Moves back. |
| Enter or Space | On a header, sorts that column, or reverses it. |
Copy the code for HTML, WordPress or React from the Code tab in Live example. The options are listed under Specifications.
Use Data table from 01 Library – Foundations. Pick Default or Sortable, and always write a caption.
Is this page useful?