Pagination

Cursor-style paging for the console's APIs: “Load more”, or previous and next.

View source
import { Pagination } from "@logicplanes/kaeso-ui";

Props

  • hasMore
    boolean

    Whether there is a next page.

  • hasPrevious
    boolean

    Whether there is a previous page.

  • loading
    boolean

    Shows that a page is loading.

  • onLoadMore
    (() => void)

    Called by the Load more button.

  • onNext
    (() => void)

    Called to go to the next page.

  • onPageChange
    ((page: number) => void)

    Called with the chosen page number.

  • onPrevious
    (() => void)

    Called to go to the previous page.

  • page
    number = 1

    pages:

  • pageCount
    number = 1

    The number of pages, for numbered pages.

  • variant
    "cursor" | "load-more" | "pages" = load-more

    Numbered pages, previous and next by cursor, or a Load more button.