Skip to content

Pagination

A responsive and flexible pagination

Examples

Base

Show code

Slots

Show code

Class props

'Classes applied to the element'

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 binding.number-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 orderstringcentered, 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
roundedRounded button styleboolean-
From config:
pagination: {
  rounded: false
}
simpleSimple 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
click (event:Event): void - onClick handler
ariaLabel string - aria-label attribute
nextNext button slotnumber number - page number
isCurrent boolean - if page is current
click (event:Event): void - onClick handler
ariaLabel string - aria-label attribute
defaultPagination button slotnumber number - page number
isCurrent boolean - if page is current
click (event:Event): void - onClick handler
ariaLabel string - aria-label attribute

Sass variables

Current theme ➜ Oruga Base

SASS VariableDefault
$pagination-disabled-opacity$base-disabled-opacity
$pagination-ellipsis-color$grey-light
$pagination-link-border-color$grey-lighter
$pagination-link-border-radius$base-border-radius
$pagination-link-border1px solid transparent
$pagination-link-color#363636
$pagination-link-current-background-color$primary
$pagination-link-current-border-color$primary
// !!!$pagination-link-current-color#fff
$pagination-link-height2.25em
$pagination-link-hover-border-color$grey-light
$pagination-link-line-height$base-line-height
$pagination-link-margin0.25rem
$pagination-link-min-width2.25em
$pagination-link-padding0.5em 0.5em
$pagination-margin-0.25rem
$pagination-rounded-border-radius$base-rounded-border-radius

See ➜ 📄 Full scss file

Current theme ➜ Oruga Full

SASS VariableDefault
$pagination-disabled-opacity$base-disabled-opacity
$pagination-ellipsis-color$grey-light
$pagination-link-border-color$grey-lighter
$pagination-link-border-radius$base-border-radius
$pagination-link-border1px solid transparent
$pagination-link-color#363636
$pagination-link-current-background-color$primary
$pagination-link-current-border-color$primary
// !!!$pagination-link-current-color#fff
$pagination-link-height2.25em
$pagination-link-hover-border-color$grey-light
$pagination-link-line-height$base-line-height
$pagination-link-margin0.25rem
$pagination-link-min-width2.25em
$pagination-link-padding0.5em 0.5em
$pagination-margin-0.25rem
$pagination-rounded-border-radius$base-rounded-border-radius

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.