Paginator API

API documentation for Paginator component

Paginator#

Props#

Defines valid properties in Paginator component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PaginatorInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PaginatorInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PaginatorPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PaginatorInstance) => ReactNode)
null
The children to render.
defaultPagenumber
1
Default page number.
pagenumber
null
Current page number (controlled).
totalnumber
0
Total number of items.
itemsPerPagenumber
10
Number of items per page.
onPageChange(event: usePaginatorChangeEvent) => void
null
Callback fired when the page changes.
siblingsnumber
2
Number of sibling pages to show on each side of current page.
edgesnumber
1
Number of edge pages to show at the beginning and end.
disabledboolean
false
Whether the paginator is disabled.
showEllipsisboolean
true
Whether to show ellipsis.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

State#

Defines valid state in Paginator component.

nametypedefaultdescription
activePagenumber
null
Current active page number.
canPrevboolean
null
Whether the previous page is available.
canNextboolean
null
Whether the next page is available.
totalPagesnumber
null
Total number of pages.

Exposes#

Defines the methods and properties exposed by Paginator component.

nametypedefaultdescription
getAriaLabel(labelType: string) => string
null
Get the aria label for the given label type.
prev() => void
null
Go to previous page.
next() => void
null
Go to next page.
first() => void
null
Go to first page.
last() => void
null
Go to last page.
handlePage(page?: number) => void
null
Set the current page.
pagesPaginatorPageItem[]
null
Pages array.

Interfaces#

Defines passthrough(pt) options of Paginator component.

nametypedefaultdescription
rootPaginatorPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.
contentPaginatorPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the content's DOM element.
firstPaginatorPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the first's DOM element.
prevPaginatorPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the prev's DOM element.
nextPaginatorPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the next's DOM element.
lastPaginatorPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the last's DOM element.

Types#

Instance of Paginator component.

values
ComponentInstance<PaginatorProps, PaginatorState, PaginatorExposes>

PaginatorPages#

Props#

Defines valid properties in PaginatorPages component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PaginatorPagesInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PaginatorPagesInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PaginatorPagesPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PaginatorPagesInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by PaginatorPages component.

nametypedefaultdescription
paginatorPaginatorInstance
null

Interfaces#

Defines passthrough(pt) options of PaginatorPages component.

nametypedefaultdescription
rootPaginatorPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PaginatorPages component.

values
ComponentInstance<PaginatorPagesProps, PaginatorPagesState, PaginatorPagesExposes>

PaginatorPage#

Props#

Defines valid properties in PaginatorPage component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PaginatorPageInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PaginatorPageInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PaginatorPagePassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PaginatorPageInstance) => ReactNode)
null
The children to render.
disabledboolean
null
Used to disable the page button.
valuenumber
null
Used to set the value of the page button.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by PaginatorPage component.

nametypedefaultdescription
paginatorPaginatorInstance
null

Interfaces#

Defines passthrough(pt) options of PaginatorPage component.

nametypedefaultdescription
rootPaginatorPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PaginatorPage component.

values
ComponentInstance<PaginatorPageProps, PaginatorPageState, PaginatorPageExposes>

PaginatorEllipsis#

Props#

Defines valid properties in PaginatorEllipsis component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PaginatorEllipsisInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PaginatorEllipsisInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PaginatorEllipsisPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PaginatorEllipsisInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by PaginatorEllipsis component.

nametypedefaultdescription
paginatorPaginatorInstance
null

Interfaces#

Defines passthrough(pt) options of PaginatorEllipsis component.

nametypedefaultdescription
rootPaginatorPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PaginatorEllipsis component.

values
ComponentInstance<PaginatorEllipsisProps, PaginatorEllipsisState, PaginatorEllipsisExposes>

PaginatorFirst#

Props#

Defines valid properties in PaginatorFirst component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PaginatorFirstInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PaginatorFirstInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PaginatorFirstPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PaginatorFirstInstance) => ReactNode)
null
The children to render.
disabledboolean
null
Used to disable the first button.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by PaginatorFirst component.

nametypedefaultdescription
paginatorPaginatorInstance
null

Interfaces#

Defines passthrough(pt) options of PaginatorFirst component.

nametypedefaultdescription
rootPaginatorPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PaginatorFirst component.

values
ComponentInstance<PaginatorFirstProps, PaginatorFirstState, PaginatorFirstExposes>

PaginatorLast#

Props#

Defines valid properties in PaginatorLast component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PaginatorLastInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PaginatorLastInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PaginatorLastPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PaginatorLastInstance) => ReactNode)
null
The children to render.
disabledboolean
null
Used to disable the last button.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by PaginatorLast component.

nametypedefaultdescription
paginatorPaginatorInstance
null

Interfaces#

Defines passthrough(pt) options of PaginatorLast component.

nametypedefaultdescription
rootPaginatorPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PaginatorLast component.

values
ComponentInstance<PaginatorLastProps, PaginatorLastState, PaginatorLastExposes>

PaginatorNext#

Props#

Defines valid properties in PaginatorNext component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PaginatorNextInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PaginatorNextInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PaginatorNextPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PaginatorNextInstance) => ReactNode)
null
The children to render.
disabledboolean
null
Used to disable the next button.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by PaginatorNext component.

nametypedefaultdescription
paginatorPaginatorInstance
null

Interfaces#

Defines passthrough(pt) options of PaginatorNext component.

nametypedefaultdescription
rootPaginatorPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PaginatorNext component.

values
ComponentInstance<PaginatorNextProps, PaginatorNextState, PaginatorNextExposes>

PaginatorPrev#

Props#

Defines valid properties in PaginatorPrev component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PaginatorPrevInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PaginatorPrevInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PaginatorPrevPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PaginatorPrevInstance) => ReactNode)
null
The children to render.
disabledboolean
null
Used to disable the previous button.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by PaginatorPrev component.

nametypedefaultdescription
paginatorPaginatorInstance
null

Interfaces#

Defines passthrough(pt) options of PaginatorPrev component.

nametypedefaultdescription
rootPaginatorPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PaginatorPrev component.

values
ComponentInstance<PaginatorPrevProps, PaginatorPrevState, PaginatorPrevExposes>

usePaginator#

Props#

Defines valid properties in usePaginator.

nametypedefaultdescription
defaultPagenumber
1
Default page number.
pagenumber
null
Current page number (controlled).
totalnumber
0
Total number of items.
itemsPerPagenumber
10
Number of items per page.
onPageChange(event: usePaginatorChangeEvent) => void
null
Callback fired when the page changes.
siblingsnumber
2
Number of sibling pages to show on each side of current page.
edgesnumber
1
Number of edge pages to show at the beginning and end.
disabledboolean
false
Whether the paginator is disabled.
showEllipsisboolean
true
Whether to show ellipsis.

State#

Defines valid state in usePaginator.

nametypedefaultdescription
activePagenumber
null
Current active page number.
canPrevboolean
null
Whether the previous page is available.
canNextboolean
null
Whether the next page is available.
totalPagesnumber
null
Total number of pages.

Exposes#

Defines the return type of usePaginator.

nametypedefaultdescription
prev() => void
null
Go to previous page.
next() => void
null
Go to next page.
first() => void
null
Go to first page.
last() => void
null
Go to last page.
handlePage(page?: number) => void
null
Set the current page.
pagesPaginatorPageItem[]
null
Pages array.

Types#

Instance of usePaginator headless.

values
HeadlessInstance<usePaginatorProps, usePaginatorState, usePaginatorExposes>