Base
JS behaviour
Pagination
Paging with locale digits, the “…” gap, a pill under the active page and Livewire or plain-link modes.
Real scenarios
The component as it is used in a product — not a specimen grid.
The invoices, five at a time
The links keep the page in the URL, so the back button and sharing both work; the pill under the active number says where you are.
Showing 11–12 of 12
- #1,411 Rasa Labs 17,150,000 Toman
- #1,412 Nabu Studio 18,400,000 Toman
Deep in the archive
94 old issues on 19 pages: with a single sibling each side, the far ends fold into gaps — click through and watch the window slide.
Page 4 of 19
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| paginator | LengthAwarePaginator | null | Laravel’s paginator; page and links come out of it. |
| livewire | bool | false | Uses gotoPage(n) instead of a page reload — with the WithPagination trait. |
| siblings | int | 1 | Page numbers shown beside the active one. |
Snippet
<x-nx::pagination :paginator="$invoices" livewire />
{{-- یا صریح: --}}
<x-nx::pagination :page="2" :pages="9" :url="fn ($p) => '/invoices?page='.$p" />