AisPagination

AisPagination is a custom input component that provides a current page number input control. The value should be bound via v-model in your app. Page numbers are indexed from 1. The number of pages is computed from the provided prop values for total-rows and per-page.

Selected Page = [5]

Size

Selected Page = [5]

Align

start
center
end
fill
Selected Page = [5]

Custom Text

Selected Page = [5]

Hide Ellipsis

Selected Page = [5]

Goto First/Last Buttons

Selected Page = [5]

Slots

Selected Page = [5]

Rounded

rounded-none
rounded-sm
rounded
rounded-md
rounded-xl
rounded-2xl
rounded-3xl
rounded-full
Selected Page = [5]

Variants

primary
secondary
default
info
success
warning
danger
primary outline
secondary outline
default outline
info outline
success outline
warning outline
danger outline
Selected Page = [5]

Component Reference

Props

Property
1
Type(s)
Description
Required
Default
align
String
Alignment of the pagination buttons
Valid values:
start, left, center, end, right, fill
'center'
ariaControls
String
ID of the element or component that this controls. Value is placed in the aria-controls attribute
''
ariaLabel
String
Value to place in the aria-label attribute of the pagination control
'Pagination'
disabled
Boolean
When set to true, disables the component's functionality and places it in a disabled state
false
ellipsisClass
Array, Object, String
Class(es) to apply to the 'ellipsis' placeholders
''
ellipsisText
String
Content to place in the ellipsis placeholder
undefined
firstClass
Array, Object, String
Class(es) to apply to the 'Go to first page' button
null
firstNumber
Boolean
Display first page number instead of Goto First button
false
firstText
String
Content to place in the goto first page button
undefined
hideEllipsis
Boolean
Do not show ellipsis buttons
false
hideGotoEndButtons
Boolean
Hides the goto first and goto last page buttons
false
labelFirstPage
String
Value to place in the aria-label attribute of the goto first page button
'Go to first page'
labelLastPage
String
Value to place in the aria-label attribute of the goto last page button
'Go to last page'
labelNextPage
String
Value to place in the aria-label attribute of the goto next page button
'Go to next page'
labelPage
Func, String
Value to place in the aria-label attribute of the goto page button. Page number will be appended automatically
'Go to page'
labelPrevPage
String
Value to place in the aria-label attribute of the goto previous page button
'Go to previous page'
lastClass
Array, Object, String
Class(es) to apply to the 'Go to last page' button
''
lastNumber
Boolean
Display last page number instead of 'Goto Last' button
false
lastText
String
Content to place in the goto last page button
undefined
limit
Number, String
Maximum number of buttons to show (including ellipsis if shown, but excluding the bookend buttons)
5
modelValue
Number
The current page number
1
nextClass
Array, Object, String
Class(es) to apply to the 'Go to next page' button
''
nextText
String
Content to place in the goto next page button
undefined
outline
Boolean
Applies one of the theme color variants to the border instead of the background. This replaces the deprecated alternate prop
false
pageClass
Array, Object, String
Class(es) to apply to the 'Go to page #' buttons
''
perPage
Number, String
Number of rows per page
10
pills
Boolean
Applies pill styling to the pagination buttons
false
prevClass
Array, Object, String
Class(es) to apply to the 'Go to previous page' button
null
prevText
String
Content to place in the goto previous page button
undefined
rounded
Boolean, String
Applies rounded corners using TailwindCSS's rounded classes
undefined
size
String
Size of the rendered buttons
Valid values:
xs, sm, md, lg, xl
'sm'
totalRows
Number, String
Total number of rows in the dataset
0
variant
String
Applies one of the theme color variants to the component.
'default'

Slots

Name
1
Scoped
Description
ellipsis-text
No
The '...' indicator content
first-text
No
The "go to first page" button content
last-text
No
The "go to last page" button content
next-text
No
The "go to next page" button content
prev-text
No
The "go to previous page" button content

Events

Event
1
Arguments
Description
change
  • page
    number
    -
    The current page
Emitted when the page changes
input
  • page
    number
    -
    The current page
Emitted when the page changes
update:modelValue
  • page
    number
    -
    The current page
Emitted when the page changes