Pager
Previous/next page navigation bar with arrow indicators.
Installation
dgadd ships in @diffgazer/add on npm: pnpm add -D @diffgazer/add puts it on pnpm exec, and npx @diffgazer/add runs it without the install.
UI components require Tailwind CSS v4. Local copy mode imports src/styles/styles.css; package mode uses @diffgazer/ui CSS from the installed package.
Usage
Examples
Single Direction
Long Titles
Hover and Focus
Framework Link (render prop)
API Reference
Pager
PagerLink
Accessibility
Notes
Page Spacing
Pager renders only the top rule and the link row. Vertical spacing from the content above is a page decision — add it at the call site (for example className="mt-8").
Link Navigation
Use PagerLink with a direction prop for standard anchor links. For framework-specific link components (TanStack Link, Next.js Link), use the render-prop pattern: <PagerLink direction="next">{(props) => <Link {...props} to="...">text</Link>}</PagerLink>.
Source
Install via CLI: pnpm exec dgadd add ui/pager.
Highlighted source loads after this disclosure opens. Browse the source repository.