Skip to main content
NetScriptdocs Search docs ⌘K v0.0.9
Browse documentation

Pagination

Shared pagination meta/actions block for directory and activity lists.

All components · Theme builder · Implementation source

Live preview

Open live pagination preview

Install

Shell
netscript ui:add pagination

Usage and examples

The preview runs this JSX with the installed components. Import any composed primitives from your UI directory.

TypeScript
import { useState } from 'preact/hooks';
import { Button } from '@app/components/ui/button.tsx';
import { Pagination } from '@app/components/ui/pagination.tsx';

export function Example() {
  const [value, setValue] = useState('standard');
  const [open, setOpen] = useState(false);
  const [notice, report] = useState('');
  return (<><div><Pagination><Pagination.Meta>Showing 1–6 of 3,182 orders</Pagination.Meta><Pagination.Actions><Button variant="outline" onClick={()=>report("Previous page")}>Previous</Button><Button variant="outline" onClick={()=>report("Next page")}>Next</Button></Pagination.Actions></Pagination></div><p role="status">{notice}</p></>);
}

Props

Generated from native deno doc --json --private over the shipped implementation. Compound component props retain their owning interface; native attributes pass through where declared.

OwnerPropTypeOptionalDescription
PaginationLinkPropschildrenRenderableYes
PaginationLinkPropshrefstringYes
PaginationLinkPropsclassstringYes
PaginationLinkPropstype"page" | "previous" | "next"Yes
PaginationLinkPropscurrentbooleanYes
PaginationLinkPropsdisabledbooleanYes
PaginationLinkPropsstate"rest" | "hover" | "focus" | "current" | "disabled"Yes
PaginationSectionPropschildrenRenderableNo
PaginationSectionPropsclassstringYes
PaginationPropsvariant"numbered" | "pager"Yes
TypeScript
PaginationLinkProps extends Omit<JSX.AnchorHTMLAttributes<HTMLAnchorElement>, "class" | "children" | "href" | "type">
PaginationSectionProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "class" | "children">
PaginationProps extends PaginationSectionProps

Keyboard

KeyAction
Tab/Shift+TabFocus enabled native links; skip disabled and decorative keys
EnterFollow the focused enabled destination

Tokens

Semantic contract roles: border/control, border/subtle, radius/control, space/card/padding, text/fg, text/muted.

CSS custom properties referenced directly: --ns-border-control, --ns-border-subtle, --ns-border-width, --ns-card-padding, --ns-control-gap, --ns-control-h-sm, --ns-fg, --ns-font-data, --ns-font-eyebrow, --ns-font-mono, --ns-font-sans, --ns-hover, --ns-label-size, --ns-label-tracking, --ns-leading-caption, --ns-leading-label, --ns-leading-small, --ns-leading-strong, --ns-muted-fg, --ns-radius-control, --ns-ring, --ns-space-1, --ns-space-2, --ns-space-3, --ns-stack-gap, --ns-text-label, --ns-text-sm, --ns-text-small, --ns-text-strong, --ns-tracking-label, --ns-tracking-small, --ns-weight-eyebrow, --ns-weight-small, --ns-weight-strong.

Contract and compatibility

Accessibility pattern: native navigation links

  • Native DOM attributes pass through where the implementation accepts them.
  • Meta/Actions composition remains supported. Pager tiles use native previous/next relations; document direction mirrors their decorative arrows.

Design contract values marked planned are not implementation props. The props above describe what ships today.

Search all documentation

Type a term to search the documentation.