Pagination
Pagination provides navigation for large series of related content.
Basic Example
Pagination items are automatically generated based on the items-total and the items-per-page properties. The currently selected page is accessible using v-model.
Color Variants
Inkline comes with two predefined pagination styles. You can set the color style of the <i-pagination> component using the color property, which can be light or dark. By default, pagination uses the light color.
Size Variants
You’re able to use the size property to control the size of your pagination items, using one of the available sizes: sm, md, and lg. The default size is set to md.
Limit
You’re able to use the limit modifier to control how many items to show besides the first and last items, including the two ellipsis pagination items.
Make sure this value is an odd number to have the active item centered.
To make things even better, you can responsively control the number of items at each breakpoint, to make sure your design always looks great.
Quick Links
You’re able to use the quickLink property to allow the user to click the … item to quickly jump through pages, a number of items equal to limit at a time.
Configuration
Props
Use props to modify the component’s design and behavior.
- Property
ariaLabelTypeStringDefaultPaginationDescription The aria-label of the pagination - Property
colorType'light' | 'dark'Default'light'Description The color variant of the pagination - Property
itemsPerPageTypeNumberDefault20Description The number of items per page to be displayed - Property
itemsTotalTypeNumberDefault0Description The total number of items - Property
limitTypeNumber | ObjectDefault''Description The maximum number of pagination buttons to show on each breakpoint - Property
quickLinkTypeBooleanDefaultfalseDescription Display the quick link buttons - Property
modelValueTypeNumberDefault1Description Used to determine the current page - Property
sizeType'sm' | 'md' | 'lg'Default'md'Description The size variant of the pagination
Slots
Use slots to insert custom content into well-defined component locations.
- Property
previousDescription Slot for previous button content - Property
nextDescription Slot for next button content
Events
Use events to react to something happening inside the component.
- Property
update:modelValueDescription Event emitted for setting the modelValue
CSS Variables
Read more about configuring Inkline’s Design System variables to update the look and feel of the component.
- Property
----backgroundValuecolor('light')Description The background of the pagination component item - Property
----background--hoverValuecolor('light-55')Description The background of the pagination component item when hovered or focused - Property
----background--activeValuecolor('primary')Description The background of the pagination component item when active - Property
----border-top-colorValuecolor('light-55')Description The border top color of the pagination component item - Property
----border-right-colorValuecolor('light-55')Description The border right color of the pagination component item - Property
----border-bottom-colorValuecolor('light-55')Description The border bottom color of the pagination component item - Property
----border-left-colorValuecolor('light-55')Description The border left color of the pagination component item - Property
----border-colorValuevar(----border-top-color) var(----border-right-color) var(----border-bottom-color) var(----border-left-color)Description The border color of the pagination component item - Property
----border-color--activeValuecolor('primary-55')Description The border color of the pagination component item when active - Property
----border-styleValuevar(--border-style)Description The border style of the pagination component - Property
----border-top-widthValuevar(--border-top-width)Description The border top width of the pagination component - Property
----border-right-widthValuevar(--border-right-width)Description The border right width of the pagination component - Property
----border-bottom-widthValuevar(--border-bottom-width)Description The border bottom width of the pagination component - Property
----border-left-widthValuevar(--border-left-width)Description The border left width of the pagination component - Property
----border-widthValuevar(----border-top-width) var(----border-right-width) var(----border-bottom-width) var(----border-left-width)Description The border width of the pagination component - Property
----border-top-left-radiusValuevar(--border-top-left-radius)Description The border top left radius of the pagination component - Property
----border-top-right-radiusValuevar(--border-top-right-radius)Description The border top right radius of the pagination component - Property
----border-bottom-right-radiusValuevar(--border-bottom-right-radius)Description The border bottom right radius of the pagination component - Property
----border-bottom-left-radiusValuevar(--border-bottom-left-radius)Description The border bottom left radius of the pagination component - Property
----border-radiusValuevar(----border-top-left-radius) var(----border-top-right-radius) var(----border-bottom-right-radius) var(----border-bottom-left-radius)Description The border radius of the pagination component - Property
----box-shadow-offset-xValuevar(--box-shadow-offset-x)Description The box shadow horizontal offset of the pagination component - Property
----box-shadow-offset-yValuevar(--box-shadow-offset-y)Description The box shadow vertical offset of the pagination component - Property
----box-shadow-blur-radiusValuevar(--box-shadow-blur-radius)Description The box shadow blur radius of the pagination component - Property
----box-shadow-spread-radiusValuevar(--box-shadow-spread-radius)Description The box shadow spread radius of the pagination component - Property
----box-shadow-colorValuevar(--box-shadow-color)Description The box shadow spread radius of the pagination component - Property
----box-shadowValuevar(----box-shadow-offset-x) var(----box-shadow-offset-y) var(----box-shadow-blur-radius) var(----box-shadow-spread-radius) var(----box-shadow-color)Description The box shadow of the pagination component - Property
----colorValuecontrast-color($color-light)Description The border color of the pagination component item when active - Property
----color--activeValuecontrast-color($color-primary)Description The border color of the pagination component item when active - Property
----font-sizeValuefont-size()Description The font size of the pagination component - Property
----margin-topValue0Description The margin top of the pagination component - Property
----margin-rightValuecalc(var(--margin-right) / 4)Description The margin right of the pagination component - Property
----margin-bottomValue0Description The margin bottom of the pagination component - Property
----margin-leftValuecalc(var(--margin-left) / 4)Description The margin left of the pagination component - Property
----marginValuevar(----margin-top) var(----margin-right) var(----margin-bottom) var(----margin-left)Description The margin of the pagination component - Property
----min-widthValue40pxDescription The minimum width of the pagination component items - Property
----opacity--disabledValue0.85Description The opacity of the pagination component when disabled - Property
----padding-topValuecalc(var(--padding-top) / 2)Description The padding top of the pagination component - Property
----padding-rightValuecalc(var(--padding-right) / 2)Description The padding right of the pagination component - Property
----padding-bottomValuecalc(var(--padding-bottom) / 2)Description The padding bottom of the pagination component - Property
----padding-leftValuecalc(var(--padding-left) / 2)Description The padding left of the pagination component - Property
----paddingValuevar(----padding-top) var(----padding-right) var(----padding-bottom) var(----padding-left)Description The padding of the pagination component