AsterUIDocsv1.0.2

Docs / Component reference

Pagination

Move through records a page at a time while keeping the current page visible.

Pagination example

Install

sh
npx @fierst/ui@1.0.2 add pagination

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/pagination: Pagination.

Download the registry source for pagination 1.0.2.

API contracts

ts
export function* Pagination(
  props: {
    page?: number;
    defaultPage?: number;
    totalPages: number;
    siblings?: number;
    onChange?: (page: number) => void;
    class?: string;
  },
  ctx: Ctx,
)