Usage
Use the default-page prop or the v-model:page directive to control the current page.
{
"wait": "Loading client-side content..."
}Button to display the pages, use color and size props to style them.Total
Use the total prop to set the total number of items in the list.
{
"wait": "Loading client-side content..."
}Items Per Page
Use the items-per-page prop to set the number of items per page. Defaults to 10.
{
"wait": "Loading client-side content..."
}Sibling Count
Use the sibling-count prop to set the number of siblings to show. Defaults to 2.
{
"wait": "Loading client-side content..."
}Show Edges
Use the show-edges prop to always show the ellipsis, first and last pages. Defaults to false.
{
"wait": "Loading client-side content..."
}Show Controls
Use the show-controls prop to show the first, prev, next and last buttons. Defaults to true.
{
"wait": "Loading client-side content..."
}Color
Use the color prop to set the color of the inactive controls. Defaults to air-secondary-no-accent.
{
"wait": "Loading client-side content..."
}Active Color
Use the active-color prop to set the color of the active control. Defaults to air-primary.
{
"wait": "Loading client-side content..."
}Size
Use the size prop to set the size of the controls. Defaults to md.
{
"wait": "Loading client-side content..."
}Disabled
Use the disabled prop to disable the pagination controls.
{
"wait": "Loading client-side content..."
}Examples
With links
Use the to prop to transform buttons into links. Pass a function that receives the page number and returns a route destination.
#with-links hash to avoid going to the top of the page.API
Props
Slots
Emits
Theme
export default defineAppConfig({
b24ui: {
pagination: {
slots: {
root: '',
list: 'flex items-center gap-1',
ellipsis: 'pointer-events-none',
label: 'text-center',
first: '',
prev: '',
item: '',
next: '',
last: ''
}
}
}
})
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import bitrix24UIPluginVite from '@bitrix24/b24ui-nuxt/vite'
export default defineConfig({
plugins: [
vue(),
bitrix24UIPluginVite({
b24ui: {
pagination: {
slots: {
root: '',
list: 'flex items-center gap-1',
ellipsis: 'pointer-events-none',
label: 'text-center',
first: '',
prev: '',
item: '',
next: '',
last: ''
}
}
}
})
]
})