Data
JS behaviour
Data table
A table with sorting and row FLIP: click a header and the rows glide to their new places; number, currency, percent, date and status formats are built in.
Real scenarios
The component as it is used in a product — not a specimen grid.
The member directory
Search hits the server on every keystroke; sorting runs in the browser — click a header and the rows glide to their new places (FLIP), keeping their keys through the morph.
| نیلوفر احمدی | Design | Running | 342 | 96% | $48,200.00 | Sep 24, 2026 |
| Kenji Sato | Motion | Succeeded | 214 | 91% | $31,750.00 | Sep 18, 2026 |
| María López | Data | Queued | 129 | 88% | $12,900.00 | Sep 25, 2026 |
| Amara Okafor | Support | Running | 415 | 97% | $22,400.00 | Sep 21, 2026 |
| عمر حداد | Frontend | Failed | 97 | 84% | $67,300.00 | Sep 26, 2026 |
| Priya Nair | Program | Succeeded | 288 | 93% | $54,100.00 | Sep 12, 2026 |
| Lena Fischer | Research | Canceled | 61 | 90% | $8,800.00 | Aug 30, 2026 |
| Haruto Sato | Support | Running | 176 | 89% | $19,600.00 | Sep 23, 2026 |
| Layla Haddad | Design | Queued | 203 | 92% | $26,450.00 | Sep 26, 2026 |
Removing someone, the careful way
The same rows in a compact, density-tight table; the delete icon opens a dialog bound to a Livewire property — confirm runs a slow action so the button shows its spinner.
نیلوفر احمدی
Kenji Sato
María López
Amara Okafor
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| rows / columns | array | [] | Columns: ['key' => …, 'label' => …, 'sortable' => true, 'format' => "number|compact|percent|currency:EUR|date|datetime|status"]. |
| sort / sortAction | string | null | Sorting runs in the browser by default; sort-action="sortBy" sends each header to $wire.sortBy(key, dir) while sort="name:ascending" returns the current one. |
| rowKey | string | id | The rows’ wire:key so they keep gliding after a morph. |
| caption / captionHidden | string / bool | null / false | The table’s caption for screen readers (and optionally visible). |
| maxHeight / density / emptyText | string / string / string | null | The scrollable height, the row density and the empty-state text. |
Snippet
<x-nx::data-table caption="پروژهها" sort="budget:descending" :rows="$projects" :columns="[
['key' => 'name', 'label' => 'پروژه', 'sortable' => true],
['key' => 'status', 'label' => 'وضعیت', 'format' => 'status', 'sortable' => true],
['key' => 'budget', 'label' => 'بودجه', 'format' => 'currency:USD', 'sortable' => true],
]" />