Pagination
Pagination renders a responsive page navigation control and delegates link or button rendering to a child render function.
Code
import { Pagination } from "@falcon/ui-kit/dist/legacy";
export function Example() { return ( <Pagination activePage={5} pageCount={12}> {(page, props) => ( <a {...props} href={page == null ? undefined : `https://example.com/?page=${page}`} rel="noopener" target="_blank" /> )} </Pagination> );}Buttons
Section titled “Buttons”Code
import { Pagination } from "@falcon/ui-kit/dist/legacy";
export function Example() { return ( <Pagination activePage={5} pageCount={12}> {(page, props) => ( <button {...props} disabled={page == null} type="button" onClick={() => {}} /> )} </Pagination> );}State Variations
Section titled “State Variations”Code
import { Pagination } from "@falcon/ui-kit/dist/legacy";
export function Example() { return ( <div className="tw:flex tw:flex-col tw:gap-8"> {Array.from({ length: 12 }, (_, i) => i + 1).map((activePage) => ( <Pagination activePage={activePage} key={activePage} pageCount={12}> {(page, props) => ( <a {...props} href={ page == null ? undefined : `https://example.com/?page=${page}` } rel="noopener" target="_blank" /> )} </Pagination> ))} </div> );}Pagination
Section titled “Pagination”activePage
Section titled “activePage”activePage: numberchildren
Section titled “children”children: (page: number | undefined, props: PaginationItemProps) => React.ReactElementclassName
Section titled “className”className?: stringpageCount
Section titled “pageCount”pageCount: number