Table
A table displays data in rows and columns and enables a user to navigate its contents via directional navigation keys, and optionally supports row selection and sorting.
Installation
Examples
Searchable
In the latest React Aria release, tables can now be made searchable since Autocomplete supports all collection types, including Table This allows users to filter table rows directly with their input.
This example comes from a tweet by Devon here.
# | Name | Email | Role | Status | Joined | |
|---|---|---|---|---|---|---|
| 1 | Justice Larkin | justice.larkin@example.com | Admin | Active | 2022-01-15 | |
| 2 | Megan Smith | megan.smith@example.com | Editor | Active | 2022-03-12 | |
| 3 | Daniel Wu | daniel.wu@example.com | Viewer | Inactive | 2022-04-08 | |
| 4 | Sophia Hernandez | sophia.hernandez@example.com | Admin | Active | 2022-05-25 | |
| 5 | Liam Johnson | liam.johnson@example.com | Editor | Suspended | 2022-06-14 | |
| 6 | Emily Brown | emily.brown@example.com | Viewer | Active | 2022-07-09 | |
| 7 | Noah Miller | noah.miller@example.com | Admin | Active | 2022-08-02 | |
| 8 | Ava Wilson | ava.wilson@example.com | Editor | Inactive | 2022-09-19 | |
| 9 | Ethan Davis | ethan.davis@example.com | Viewer | Active | 2022-10-21 | |
| 10 | Olivia Martinez | olivia.martinez@example.com | Editor | Active | 2022-11-30 |
Expandable rows
Tables can have expandable rows to show additional details. This is useful for displaying more information without clutter ing the main table view.
Project | Owner | Team | Status | Progress | Last updated | ||
|---|---|---|---|---|---|---|---|
| Emma Taylor | Brand | In progress | 72% | Apr 10, 2026 | |||
| Sophia Brown | Product | In progress | 58% | Apr 14, 2026 | |||
| Isabella Lewis | Data | In review | 84% | Apr 15, 2026 | |||
| Security audit | Charlotte Allen | Platform | Planned | 12% | Apr 5, 2026 | ||
| Billing system upgrade | Elijah Young | Finance | Blocked | 43% | Apr 3, 2026 |
Bulk actions
Tables may require bulk actions for handling multiple entries at once.
# | Title | Author | Genre | Published | |
|---|---|---|---|---|---|
| 1 | To Kill a Mockingbird | Harper Lee | Fiction | 1960 | |
| 2 | 1984 | George Orwell | Dystopian | 1949 | |
| 3 | The Great Gatsby | F. Scott Fitzgerald | Fiction | 1925 | |
| 4 | The Catcher in the Rye | J.D. Salinger | Fiction | 1951 | |
| 5 | Pride and Prejudice | Jane Austen | Romance | 1813 | |
| 6 | The Lord of the Rings | J.R.R. Tolkien | Fantasy | 1954 | |
| 7 | Harry Potter and the Sorcerer's Stone | J.K. Rowling | Fantasy | 1997 |
Drag and drop
Similar to GridList, tables can also support drag and drop functionality.
# | Name | Genre | Release | Rating | ||
|---|---|---|---|---|---|---|
| 1 | The Matrix | Sci-Fi | 1999 | 8.7 | ||
| 2 | Inception | Sci-Fi | 2010 | 8.8 | ||
| 3 | The Godfather | Crime | 1972 | 9.2 | ||
| 4 | Pulp Fiction | Crime | 1994 | 8.9 | ||
| 5 | The Dark Knight | Action | 2008 | 9 | ||
| 6 | Fight Club | Drama | 1999 | 8.8 | ||
| 7 | Forrest Gump | Drama | 1994 | 8.8 |
Sorting
Tables can be made sortable. Activate sorting by clicking on a column header.
Title | Director | Producer | Release Date |
|---|---|---|---|
Resizable
Tables can be made resizable. To enable resizing, set the allowResize prop to true. And to make a column resizable, set the isResizable prop to true on the column.
ID | Name | Email | Age | Role | Band | Status |
|---|---|---|---|---|---|---|
| 1 | Randy Blythe | randy.blythe@example.com | 52 | Vocalist | Lamb of God | Active |
| 2 | Phil Anselmo | phil.anselmo@example.com | 55 | Vocalist | Pantera | Active |
| 3 | George Fisher | george.fisher@example.com | 53 | Vocalist | Cannibal Corpse | Active |
| 4 | Corey Taylor | corey.taylor@example.com | 50 | Vocalist | Slipknot | Active |
| 5 | Trevor Strnad | trevor.strnad@example.com | 41 | Vocalist | The Black Dahlia Murder | Inactive |
| 6 | Chuck Schuldiner | chuck.schuldiner@example.com | 34 | Vocalist | Death | Deceased |
| 7 | Mitch Lucker | mitch.lucker@example.com | 28 | Vocalist | Suicide Silence | Deceased |
Infinite scrolling
Tables can handle large datasets efficiently with infinite scrolling. This allows for loading more data as the user scrolls down, improving performance and user experience.
Name | Height | Mass | Birth year | Gender | Eye |
|---|---|---|---|---|---|
No characters found. | |||||
Links
To create a clickable link within a table row, use the href prop.
<TableRow href='/collections/table-demo'/>For client-side routing, React Aria recommends using the onAction event to handle navigation programmatically instead of passing an href prop.
This is because some collection items cannot be rendered as native elements due to HTML specification limitations.