Component libraryPagination
Pagination
ProPage navigation, page size and direct page entry.
npx shadcn@latest add @tidal-pro/paginationInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/pagination.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
Required controlled page (1-based), pageCount and onPageChange. Finite counts floor/clamp0..MAX_SAFE_INTEGER; nonfinite or nonpositive counts show No pages, and page clamps into the available range without mutating caller state. Optional label(defaultPagination), windowSize(default7; floors/clamps1..9), disabled, getHref(page):string, theme(light|dark; pass for modal), native nav attributes/ref/className/style. ResizeObserver adapts visible page slots to the container while retaining the current page; larger windows retain boundary pages and actionable gaps, smaller windows stay contiguous. Tab/Enter/Space native buttons; anchors with getHref preserve modified-click navigation while primary clicks invoke onPageChange. Disabled anchors become noninteractive spans without href. Current control carries aria-current=page. Page summary and gaps open a labelled Radix modal for strict whole-number page input, trapped focus, Escape/close and focus return. Stable keyed numbers and a measured current marker move continuously; reduced motion resolves immediately. SSR has a static selected-control fallback. The caller owns routing, records, loading, announcements and content focus.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.