Pagination
Moves through a list a page at a time and says which items are on screen.
Examples
Filings
Recent filings
BK-48201 | Maya Chen | Garden double | 1 | $180.00 |
BK-48202 | Lucas Meyer | Courtyard twin | 2 | $300.00 |
BK-48203 | Clara Dubois | Harbour suite | 3 | $1,260.00 |
BK-48204 | James Whitaker | Loft studio | 4 | $840.00 |
BK-48205 | Elena Petrova | Loft studio | 5 | $1,050.00 |
BK-48206 | Daniel Okafor | Garden double | 1 | $180.00 |
BK-48207 | Hanna Lindqvist | Courtyard twin | 2 | $300.00 |
BK-48208 | Grace Whitfield | Harbour suite | 3 | $1,260.00 |
BK-48209 | Priya Nair | Harbour suite | 4 | $1,680.00 |
BK-48210 | Kenji Morita | Loft studio | 5 | $1,050.00 |
Upcoming bookings
- Ada Okafor
- Bruno Lima
- Chen Wei
- Dana Cohen
- Priya Nair
States
Usage
Use it when
- A list a server pages, where a person wants to know where they are and jump, such as search results or filings.
- A page number that belongs in the address, so a page can be shared and comes back on reload.
- A list whose rows a page turn, a filter or a sort will replace: a ListBody around the rows keeps them on screen, dimmed, until the answer lands.
Use something else when
- A table of records that scrolls through every row the server holds. Use DataTable instead, which windows its rows and dims them itself.
- A list that always fits on one page. Use Section instead, with the count beside its heading.
- The list has no rows yet. Use Skeleton rows at the row height instead, so the page keeps its shape.
- The next page failed to load. Use Empty with a retry in place of the rows instead, which has words a dim cannot carry.
- Steps of one task, such as a setup flow. Use Tabs instead.
- Switching between views of one thing. Use SegmentedControl instead.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/pagination.json https://kaanarici.com/r/cobalt/list-body.jsonimport { Pagination, pageSlots } from "@/components/cobalt/ui/pagination"import { ListBody } from "@/components/cobalt/ui/list-body"