Skip to content

Pagination

The Pagination component is responsive and flexible way to indicate a series of related content exists across multiple pages.

Examples

Base

Slots

Use slots to override the specific buttons.

Pagination component

A responsive and flexible pagination.

html
<o-pagination></o-pagination>

Props

Prop nameDescriptionTypeValuesDefault
ariaCurrentLabelAccessibility label for the current page button.string-
From config:
pagination: {
  ariaCurrentLabel: "Current page"
}
ariaNextLabelAccessibility label for the next page button.string-
From config:
pagination: {
  ariaNextLabel: "Next page"
}
ariaPageLabelAccessibility label for the page button.string-
From config:
pagination: {
  ariaPageLabel: "Page"
}
ariaPreviousLabelAccessibility label for the previous page button.string-
From config:
pagination: {
  ariaPreviousLabel: "Previous page"
}
buttonTagPagination button tag nameDynamicComponent-
From config:
pagination: {
  buttonTag: "button"
}
currentCurrent page number, use v-model:current to make it two-way bindingnumber-1
iconNextIcon to use for next buttonstring-
From config:
pagination: {
  iconNext: "chevron-right"
}
iconPackIcon pack to usestringmdi, fa, fas and any other custom icon pack
From config:
pagination: {
  iconPack: undefined
}
iconPrevIcon to use for previous buttonstring-
From config:
pagination: {
  iconPrev: "chevron-left"
}
mobileBreakpointMobile breakpoint as max-width valuestring-
From config:
pagination: {
  mobileBreakpoint: undefined
}
orderButtons order"centered" | "left" | "right"centered, right, left
From config:
pagination: {
  order: "right"
}
overrideOverride existing theme classes completelyboolean-
perPageItems count for each pagenumber | string-
From config:
pagination: {
  perPage: 20
}
rangeAfterNumber of pagination items to show after current page.number-1
rangeBeforeNumber of pagination items to show before current page.number-1
roundedEnable rounded button styleboolean-
From config:
pagination: {
  rounded: false
}
simpleEnable simple styleboolean-
From config:
pagination: {
  simple: false
}
sizePagination sizestringsmall, medium, large
From config:
pagination: {
  size: undefined
}
totalTotal count of itemsnumber-

Events

Event namePropertiesDescription
update:currentvalue number - updated current propcurrent prop two-way binding
changevalue number - current valueon current change event

Slots

NameDescriptionBindings
previousPrevious button slotnumber number - page number
isCurrent boolean - if page is current
onClick (event:Event): void - click handler
ariaLabel string - aria-label attribute
nextNext button slotnumber number - page number
isCurrent boolean - if page is current
onClick (event:Event): void - click handler
ariaLabel string - aria-label attribute
defaultPagination button slotnumber number - page number
isCurrent boolean - if page is current
onClick (event:Event): void - click handler
ariaLabel string - aria-label attribute

Class Inspector

Classes applied to the element:
Class propDescriptionPropsSuffixes
rootClassClass of the root element.
mobileClassClass of the root element when on mobile.
👉 Switch to mobile view to see it in action!
orderClassClass of the root element with order.ordercentered
right
left
sizeClassClass for the root elemnt with size.sizesmall
medium
large
simpleClassClass of the root element when in `simple` mode.simple
infoClassClass of the page info in `simple` mode.simple
listClassClass of the items list element.
listItemClassClass of the list item element.
ellipsisClassClass of the ellipsis element.
buttonClassClass of the button element.
roundedClassClass of the button element when rounded.rounded
buttonCurrentClassClass of the current button element.
buttonPrevClassClass of the prev button element.
buttonNextClassClass of the next button element.
buttonDisabledClassClass of the prev or next button when disabled.

Sass variables

Current theme ➜ Oruga

SASS VariableDefault
$pagination-disabled-opacityvar(--#{$prefix}base-disabled-opacity)
$pagination-ellipsis-colorvar(--#{$prefix}grey-light)
$pagination-button-border-colorvar(--#{$prefix}grey-light)
$pagination-button-border-radiusvar(--#{$prefix}base-border-radius)
$pagination-button-border1px solid transparent
$pagination-button-colorvar(--#{$prefix}black)
$pagination-button-background-colortransparent
$pagination-button-background-color-hovervar( --#{$prefix}grey-lighter)
$pagination-button-current-background-colorvar(--#{$prefix}primary)
$pagination-button-current-border-colorvar(--#{$prefix}primary)
$pagination-button-current-color#fff
$pagination-button-height2.25em
$pagination-button-hover-border-colorvar(--#{$prefix}grey-light)
$pagination-button-line-heightvar(--#{$prefix}base-line-height)
$pagination-button-margin0.25rem
$pagination-button-min-width2.25em
$pagination-button-padding0.5em 0.5em
$pagination-margin-0.25rem
$pagination-rounded-border-radiusvar( --#{$prefix}base-border-radius-rounded)

See ➜ 📄 Full scss file

Current theme ➜ Bulma

The theme does not have any custom variables for this component.

Current theme ➜ Bootstrap

SASS VariableDefault
$pagination-items-spacer0.5rem

See ➜ 📄 Full scss file

Released under the MIT License.