Last modified: 4/Oct/2024
Paginator
Pagination controls provide swift access to all pages while indicating that more pages exist.
#Usage
import { Paginator } from '@kinsta/stratus'
const MyComponent = () => (
<Paginator totalCount={500} itemsPerPage={50} />
)
#Props
The current page.
The total number of rows.
#itemsPerPage
number
Rows displayed per paginated page.
#prevLabel
string | number | ReactElement<any, string | JSXElementConstructor<any>>
Custom label of the "Previous" button
#nextLabel
string | number | ReactElement<any, string | JSXElementConstructor<any>>
Custom label of the "Next" button
#skipPagesLabel
string | number | ReactElement<any, string | JSXElementConstructor<any>>
Custom label of the "Skip n pages" button
#onChange
(MouseEventHandler<HTMLLIElement> | KeyboardEventHandler<HTMLLIElement>) & FormEventHandler<HTMLUListElement>
Invokes a function when a different page is clicked
Invokes a function when a different page is clicked passing the page number as a param
#type
ButtonTypes
Sets the type of the component
#icon
"AnalyticsAlt" | "AnalyticsCircleAlt" | "AnalyticsCircleSolidAlt" | "AnalyticsCircleSolid" | "AnalyticsCircle" | "AnalyticsSmall" | "AnalyticsSquareAlt" | "AnalyticsSquareSolidAlt" | ... 529 more ... | "Wrench"
Adds an icon to the button
#iconPosition
IconPosition
Positions the icon before or after the button text
#htmlType
"button" | "submit" | "reset"
Indicates the behavior of the button
#isDisabled
boolean
Sets the disabled state of button
#isLoading
boolean
Sets the loading status of button
#tooltip
TooltipType
Adds a Tooltip component around the button. Required if
isDisabled
is true
#ariaLabel
string
ARIA label of the button. Required if
tooltip
is not provided#href
string
If href is passed button will act as a link
#title
string
The title of the link
#target
"_blank" | "_self" | "_parent" | "_top"
#rel
"noopener" | "noreferrer" | "noopener noreferrer"
#Types
PaginatorProps
: props of thePaginator
component processed by stratusPaginatorInterface
:PaginatorProps
&ButtonProps
extended byHTMLAttributes<HTMLUListElement>
Read more about types here