Skip to content
RTL Support: Full
Accessibility: Full
Translations: Not Needed

Pagination

This component provides a way to navigate through paginated data with customizable options.

Default

The default pagination shows page buttons alongside a per-page dropdown.

Rows per page

1 - 15 of 183

vue
<template>
  <HLPagination
    :current-page="currentPage"
    :item-count="183"
    :per-page="currentPerPage"
    :pages-to-display="7"
    per-page-text="Rows per page"
    :per-page-dropdown-options="options"
    @update:page="changePage"
    @update:perPage="changePerPage"
  >
    <template #prev> Previous </template>
    <template #next> Next </template>
  </HLPagination>
</template>
<script setup>
  import { HLPagination } from '@platform-ui/highrise'
  import { ref } from 'vue'

  const options = [
    { key: 10, label: '10' },
    { key: 20, label: '20' },
    { key: 50, label: '50' },
    { key: 100, label: '100' },
  ]
  const currentPage = ref(1)
  const currentPerPage = ref(15)
  const changePage = page => {
    currentPage.value = page
  }
  const changePerPage = perPage => {
    currentPerPage.value = perPage
  }
</script>

Collapsed

Set collapsed to replace the numbered page buttons with a compact prev / current-page / next control.

Rows per page

1 - 15 of 183

Page 1 of 13

vue
<template>
  <HLPagination
    :current-page="currentPage"
    :item-count="183"
    :per-page="currentPerPage"
    :pages-to-display="7"
    per-page-text="Rows per page"
    :per-page-dropdown-options="options"
    @update:page="changePage"
    @update:perPage="changePerPage"
    collapsed
    show-current-range
    show-total-pages
  >
    <template #prev> Previous </template>
    <template #next> Next </template>
  </HLPagination>
</template>
<script setup>
  import { HLPagination } from '@platform-ui/highrise'
  import { ref } from 'vue'
  const options = [
    { key: 10, label: '10' },
    { key: 20, label: '20' },
    { key: 50, label: '50' },
    { key: 100, label: '100' },
  ]
  const currentPage = ref(1)
  const currentPerPage = ref(15)
  const changePage = page => {
    currentPage.value = page
  }
  const changePerPage = perPage => {
    currentPerPage.value = perPage
  }
</script>

Jump to Page

Set is-page-drop-down to turn the current-page indicator into a searchable dropdown, so users can jump straight to a page instead of stepping through with prev / next. This is worth reaching for when the page count is large enough that clicking through is impractical.

INFO

is-page-drop-down only takes effect alongside collapsed — it replaces the static current-page button that the collapsed layout renders. It has no effect on the default numbered-button layout.

Page 1 of 42

vue
<template>
  <!-- `collapsed` is required for `is-page-drop-down` to have any effect -->
  <HLPagination
    id="pagination-page-dropdown"
    :current-page="currentPage"
    :total-pages="42"
    :show-per-page-drop-down="false"
    @update:page="changePage"
    collapsed
    is-page-drop-down
    show-total-pages
  >
    <template #prev> Previous </template>
    <template #next> Next </template>
  </HLPagination>
</template>
<script setup>
  import { HLPagination } from '@platform-ui/highrise'
  import { ref } from 'vue'

  const currentPage = ref(1)
  const changePage = page => {
    currentPage.value = page
  }
</script>

All Sizes

Pagination is available in sm and md sizes.

Small (sm):

Rows per page

1 - 15 of 183

Page 1 of 13


Medium (md):

Rows per page

1 - 15 of 183

Page 1 of 13

vue
<template>
  <!-- Small (sm) -->
  <HLPagination
    :current-page="currentPage"
    :item-count="183"
    :per-page="currentPerPage"
    :per-page-dropdown-options="options"
    @update:page="changePage"
    @update:perPage="changePerPage"
    size="sm"
    show-current-range
    show-total-pages
  >
    <template #prev> Previous </template>
    <template #next> Next </template>
  </HLPagination>

  <!-- Medium (md) -->
  <HLPagination
    :current-page="currentPage"
    :item-count="183"
    :per-page="currentPerPage"
    :per-page-dropdown-options="options"
    @update:page="changePage"
    @update:perPage="changePerPage"
    size="md"
    show-current-range
    show-total-pages
  >
    <template #prev> Previous </template>
    <template #next> Next </template>
  </HLPagination>
</template>
<script setup>
  import { HLPagination } from '@platform-ui/highrise'
  import { ref } from 'vue'
  const options = [
    { key: 10, label: '10' },
    { key: 20, label: '20' },
    { key: 50, label: '50' },
    { key: 100, label: '100' },
  ]
  const currentPage = ref(1)
  const currentPerPage = ref(15)
  const changePage = page => {
    currentPage.value = page
  }
  const changePerPage = perPage => {
    currentPerPage.value = perPage
  }
</script>

Only pages

When you want to show only the pages, you can use the show-per-page-drop-down prop to hide the per page dropdown and pass the total pages to the total-pages prop.

vue
<template>
  <HLPagination
    :current-page="currentPage"
    :total-pages="13"
    :show-per-page-drop-down="false"
    :pages-to-display="7"
    @update:page="changePage"
    size="md"
    show-current-range
    :show-total-pages="false"
  >
    <template #prev> Previous </template>
    <template #next> Next </template>
  </HLPagination>
</template>
<script setup>
  import { HLPagination } from '@platform-ui/highrise'
  import { ref } from 'vue'
  const currentPage = ref(1)
  const changePage = page => {
    currentPage.value = page
  }
</script>

Inline

When you want to show the pagination inline, you can use the inline prop to show the pagination inline.

1 of 18

vue
<template>
  <HLPagination :current-page="currentPage" :total-pages="18" @update:page="changePage" inline show-total-pages> </HLPagination>
</template>
<script setup>
  import { HLPagination } from '@platform-ui/highrise'
  import { ref } from 'vue'
  const currentPage = ref(1)
  const changePage = page => {
    currentPage.value = page
  }
</script>

Accessibility

  • Keep the current page control flagged with aria-current="page" and disable unavailable buttons via aria-disabled="true".
  • Reference range summaries (“Showing 1–10 of 50”) through aria-describedby on the nav wrapper.

Imports

ts
import { HLPagination } from '@platform-ui/highrise'

Props

PropTypeDefaultDescription
id *string | undefinedundefinedUnique identifier for the elemnt
currentPagenumber1Current active page
itemCountnumber | undefinedundefinedTotal number of items. Provide together with perPage when not using totalPages
perPagenumber10Number of items per page
pagesToDisplaynumber7Number of page buttons to display
perPageTextstringundefinedLabel for the per-page dropdown. When unset, falls back to the localized "Rows per page" string for the active locale
perPageDropdownOptionsArray<{ key: number; label: string }>[]Options for items per page dropdown
size'md'| 'sm''md'Size of pagination ('sm' or 'md')
collapsedbooleanfalseWhether to show collapsed version
showCurrentRangebooleantrueWhether to show current range
showTotalPagesbooleanfalseWhether to show total pages
isPageDropDownbooleanfalseReplaces the current-page indicator with a searchable page dropdown. Requires collapsed; ignored otherwise
showPerPageDropDownbooleantrueWhether to show per page selection dropdown
totalPagesnumberundefinedTotal number of pages. Required when perPage and itemCount are not provided
inlinebooleanfalseWhether to show pagination inline

Emits

EventParametersDescription
@update:page(page: number)Emitted when page changes
@update:perPage(perPage: number)Emitted when items per page changes

Slots

NameDescription
prevCustom content for previous page button
nextCustom content for next page button