Skip to content
HomeCobalt

Pagination

Moves through a list a page at a time and says which items are on screen.

Examples

Previous, the pages with gaps, Next, and which filings are on screen.
Pages by cursorA server that hands out pages by cursor says only whether another page follows, so the pager has Previous and Next and no page numbers; the section keeps a full page's height on the last, short page.

Filings

  • Harbour Capital Advisors
    Form ADV
  • Calder & Rowe
    Form 13F
  • Northgate Investment
    Form PF
  • Fjord Asset Management
    Form ADV
  • Harbour Capital Advisors
    Form 13F
Pages as linksEach page is an address, so it can be shared and comes back on reload.
Next page loadingThe page you press is marked at once; the rows and the count stay, the rows dimmed, until that page arrives.

Recent filings

  • Harbour Capital Advisors
    Form ADV
  • Calder & Rowe
    Form 13F
  • Northgate Investment
    Form PF
  • Fjord Asset Management
    Form ADV
  • Harbour Capital Advisors
    Form 13F
Rows per pageUnder a table, a Rows per page select sits beside the count and keeps the first row in view.
BK-48201Maya ChenGarden double1$180.00
BK-48202Lucas MeyerCourtyard twin2$300.00
BK-48203Clara DuboisHarbour suite3$1,260.00
BK-48204James WhitakerLoft studio4$840.00
BK-48205Elena PetrovaLoft studio5$1,050.00
BK-48206Daniel OkaforGarden double1$180.00
BK-48207Hanna LindqvistCourtyard twin2$300.00
BK-48208Grace WhitfieldHarbour suite3$1,260.00
BK-48209Priya NairHarbour suite4$1,680.00
BK-48210Kenji MoritaLoft studio5$1,050.00
In a cardUnder a card's list of bookings, the page changes in place and the rows follow.
Upcoming bookings
  • Ada Okafor
  • Bruno Lima
  • Chen Wei
  • Dana Cohen
  • Priya Nair

States

Last pageNext is greyed out, and the count ends at the total.
Middle pageA gap on each side of the current page, and the row keeps its seven places.
NarrowIn a narrow column with the count said elsewhere, the position takes the numbers' place.

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.json
import { Pagination, pageSlots } from "@/components/cobalt/ui/pagination"
import { ListBody } from "@/components/cobalt/ui/list-body"