SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

DocsPager

The previous and next links closing a docs page.

View code
tsx
let { previous, next } = findNeighbours(tree, "/docs/monitors/http");

<DocsPager
	previous={previous}
	next={next}
	section="Monitors"
	labels={{ nav: "Pagination", previous: "Previous", next: "Next" }}
/>

Demo docs sites

Whole pages built only from @sdxc/ui, each for an invented product with its own palette and type. They open in a new tab.

Every demo, landings and docs sites alike, is listed in the demo gallery.

Installation

An ordinary dependency: install it, import the theme once, and import the component where it is used.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Usage

typescript
import { DocsPager } from "@sdxc/ui/docs";

Renders the pair of neighbours, or nothing when the page has neither. A card with no partner fills the row on its own, and the pair stacks when the pager is under 36rem wide.

Props

Read from the component's own types, so every prop, every default and every allowed value is listed.

PropTypeRequiredDescription
previousEntry | nullNo
nextEntry | nullNo
sectionstringNoSection of the page being read; a destination in another section names its own.
labelsLabelsYes

Also accepts everything in Omit<TagProps<"nav">, "children">.

@sdxc/ui

Can’t find it? Contact us