@arolariu/components
Version:
🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡
155 lines • 5.25 kB
TypeScript
import * as React from "react";
import type { ButtonProps } from "./button";
/**
* Props for the {@link Pagination} component.
*/
export type PaginationProps = React.ComponentPropsWithoutRef<"nav">;
/**
* Props for the {@link PaginationContent} component.
*/
export type PaginationContentProps = React.ComponentPropsWithoutRef<"ul">;
/**
* Props for the {@link PaginationItem} component.
*/
export type PaginationItemProps = React.ComponentPropsWithoutRef<"li">;
/**
* Props for the {@link PaginationLink} component.
*/
export interface PaginationLinkProps extends Pick<ButtonProps, "size">, React.ComponentPropsWithoutRef<"a"> {
/** Marks the link as the current active page. @default false */
isActive?: boolean;
}
/**
* Props for the {@link PaginationPrevious} component.
*/
export type PaginationPreviousProps = React.ComponentPropsWithoutRef<typeof PaginationLink>;
/**
* Props for the {@link PaginationNext} component.
*/
export type PaginationNextProps = React.ComponentPropsWithoutRef<typeof PaginationLink>;
/**
* Props for the {@link PaginationEllipsis} component.
*/
export type PaginationEllipsisProps = React.ComponentPropsWithoutRef<"span">;
/**
* Provides semantic navigation for paginated content.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<nav>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <Pagination>
* <PaginationContent />
* </Pagination>
* ```
*
* @see {@link PaginationProps} for available props
*/
declare const Pagination: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
/**
* Wraps pagination items in a flex-based list container.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<ul>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <PaginationContent>
* <PaginationItem />
* </PaginationContent>
* ```
*
* @see {@link PaginationContentProps} for available props
*/
declare const PaginationContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
/**
* Wraps an individual pagination control.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders an `<li>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <PaginationItem>
* <PaginationLink href='?page=1'>1</PaginationLink>
* </PaginationItem>
* ```
*
* @see {@link PaginationItemProps} for available props
*/
declare const PaginationItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
/**
* Renders an anchor styled to match pagination controls.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders an `<a>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <PaginationLink href='?page=2' isActive>
* 2
* </PaginationLink>
* ```
*
* @see {@link PaginationLinkProps} for available props
*/
declare const PaginationLink: React.ForwardRefExoticComponent<PaginationLinkProps & React.RefAttributes<HTMLAnchorElement>>;
/**
* Renders the pagination control for navigating to the previous page.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders an `<a>` element through {@link PaginationLink}
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <PaginationPrevious href='?page=1' />
* ```
*
* @see {@link PaginationPreviousProps} for available props
*/
declare const PaginationPrevious: React.ForwardRefExoticComponent<Omit<PaginationLinkProps & React.RefAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
/**
* Renders the pagination control for navigating to the next page.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders an `<a>` element through {@link PaginationLink}
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <PaginationNext href='?page=3' />
* ```
*
* @see {@link PaginationNextProps} for available props
*/
declare const PaginationNext: React.ForwardRefExoticComponent<Omit<PaginationLinkProps & React.RefAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
/**
* Indicates truncated page ranges within pagination.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<span>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <PaginationEllipsis />
* ```
*
* @see {@link PaginationEllipsisProps} for available props
*/
declare const PaginationEllipsis: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
//# sourceMappingURL=pagination.d.ts.map