Migrating from UIPagination to HighRise Pagination
This guide will help you migrate from the ghl-ui Pagination component to the new HighRise Pagination component.
Component Implementation Changes
Import Changes
diff
- import { UIPagination } from '@gohighlevel/ghl-ui'
+ import { HLPagination } from '@platform-ui/highrise'Breaking Changes
- Identifier and model
idis required.page➜currentPagewith@update:page.
- Counts and totals
pageCount➜totalPages(explicit), or provideitem-countwithper-pageto derive totals.
- Page size selection
pageSizes(number array) ➜perPageDropdownOptionswith{ key: number; label: string }items.showSizePicker➜showPerPageDropDown.
- Layout
simple➜collapsed(compact layout toggle).pageSlot➜pagesToDisplay(how many page buttons to show).
- Per-page label
perPageTextis now a string label; omit it to use the default translation.
Props Changes
| ghl-ui Prop | HighRise Prop | Notes |
|---|---|---|
page | currentPage | Required for current page |
pageCount | totalPages | Optional if item-count and per-page are provided |
pageSize | perPage | Current page size |
pageSizes | perPageDropdownOptions | Array of { key, label } |
pageSlot | pagesToDisplay | Visible page buttons (default: 7) |
showSizePicker | showPerPageDropDown | Toggle per-page dropdown |
simple | collapsed | Compact mode |
| - | id | Required |
| - | itemCount | Alternative to totalPages when paired with perPage |
| - | isPageDropDown | Show current page as dropdown when collapsed |
| - | showCurrentRange | Show "X - Y of Z" (default: true) |
| - | showTotalPages | Show "Page X of Y" (default: false) |
| - | inline | Inline condensed layout |
| - | size | 'sm' | 'md' |
| - | perPageText | Custom label for per-page dropdown |
Examples
Basic Pagination (Pages Only)
vue
<template>
<HLPagination
id="basic-pagination"
:current-page="currentPage"
:total-pages="10"
:show-per-page-drop-down="false"
:show-current-range="false"
@update:page="handlePageChange"
>
<template #prev>Previous</template>
<template #next>Next</template>
</HLPagination>
</template>With Item Count and Per-Page Selection
vue
<template>
<HLPagination
id="pagination-with-size"
:current-page="currentPage"
:item-count="itemCount"
:per-page="pageSize"
:per-page-dropdown-options="[
{ key: 10, label: '10' },
{ key: 20, label: '20' },
{ key: 50, label: '50' },
{ key: 100, label: '100' },
]"
:show-per-page-drop-down="true"
:show-total-pages="true"
:show-current-range="true"
@update:page="handlePageChange"
@update:perPage="handlePageSizeChange"
>
<template #prev>Previous</template>
<template #next>Next</template>
</HLPagination>
</template>Compact (Collapsed) Mode
vue
<template>
<HLPagination
id="compact-pagination"
:current-page="currentPage"
:total-pages="18"
collapsed
:show-per-page-drop-down="false"
:show-current-range="false"
@update:page="handlePageChange"
>
<template #prev>Previous</template>
<template #next>Next</template>
</HLPagination>
</template>Inline Display
vue
<template>
<HLPagination
id="inline-pagination"
:current-page="currentPage"
:total-pages="8"
inline
:show-per-page-drop-down="false"
:show-current-range="false"
:show-total-pages="true"
@update:page="handlePageChange"
/>
</template>Type Definitions
typescript
interface PerPageOption {
key: number
label: string
}Best Practices
- Provide either
total-pagesoritem-count+per-page—avoid mixing both in the same instance. - Use
collapsedfor compact layouts; pair withis-page-drop-downwhen many pages exist. - Keep
perPageDropdownOptionsconsistent across the product (e.g., 10/20/50/100). - Hide per-page controls with
show-per-page-drop-down="false"when pagination is read-only. - Set
show-current-rangetofalsewhen item counts are unknown to avoid misleading ranges. - Customize
perPageTextonly when the default copy needs localization tweaks.
Additional Notes
- Emits
update:pageandupdate:perPageonly; other UI events (prev/next buttons) resolve to these updates. - Default
show-current-rangeistrue;show-total-pagesisfalseunless set. - Sizes default to
md;smtightens padding and font sizes. - RTL and keyboard navigation are handled internally through HighRise primitives.