Pagination
Help people browse records with page numbers, page-size choices and clear navigation.
Live TypeScript example
Try the component here, then use the source below in your application.
- JavaScript
- 3.2 KiB
- Component CSS
- 0.8 KiB
- Shared theme CSS
- 3.8 KiBonce per application
How sizes are measured
The JavaScript figure includes this component’s required helpers. CSS includes its styling dependencies. Each entry is bundled separately for ES2022, minified, then compressed with gzip level 9. Your bundler may share helpers across components. Images, fonts, examples and application code are excluded.
Before compression: JavaScript 7.5 KiB; component CSS 2.4 KiB. These figures describe browser assets, not the complete package download.
View all component measurements →Interact with the Pagination example. The code below shows its actual inputs and callbacks.
import '@blukavantui/web/theme.css'
import {createPagination} from '@blukavantui/web/pagination';
import '@blukavantui/web/pagination.css';
export function mount(host: HTMLElement) {
return createPagination(host, {
"CurrentPage": 1,
"PageSize": 10,
"TotalCount": 250,
"ShowPageSize": true,
"ShowQuickJump": false,
"IsCompact": false,
"IsDisabled": false
}, { PageChanged: (page, pageSize) => { host.dataset.page = JSON.stringify({ page, pageSize }); } });
}
const instance = mount(document.getElementById('example')!)
// When this page or framework component is removed:
// instance.destroy()
Install the library and add the host element
npm install https://blukavantui.blutekmedia.com/downloads/blukavantui-web-0.6.2.tgz<div id="example"></div>This example uses the downloadable @blukavantui/web package. Your application handles persistence and authentication through its typed callbacks. The starter ZIP includes this same example.
createPagination
Pass options as the second argument and callbacks in the third argument. Keep the returned instance to update options or dispose it when its view is removed.
import { createPagination } from '@blukavantui/web/pagination';
import '@blukavantui/web/pagination.css';Load @blukavantui/web/theme.css once in your app shell.createPagination(host: HTMLElement, options: T.PaginationOptions, events?: T.PaginationEvents)Reference for @blukavantui/web 0.6.2. Required and optional follow the shipped TypeScript declarations; optional does not imply a particular default. Pass typed arrays and objects directly where shown.
Options
10| Name | Type / requirement | Usage |
|---|---|---|
CurrentPage | numberOptional | Controlled one-based page. Assign OnPageChanged.CurrentPage back to this input. |
PageSize | numberOptional | Records per page; positive integer. Assign OnPageChanged.PageSize back. |
TotalCount | numberOptional | Total matching records, not the size of the current page. |
PageSizes | number[]Optional | JSON array of positive page sizes. |
ShowPageSize | booleanOptional | Displays the page-size selector. |
ShowQuickJump | booleanOptional | Displays an accessible page-number input. |
IsCompact | booleanOptional | Uses previous/next controls and a page summary. |
IsDisabled | booleanOptional | Disables paging during a request. |
AccessibleLabel | stringOptional | Accessible navigation label. |
ExtendedClass | stringOptional | Additional CSS classes on the component root. |
Callbacks
2| Name | Type / requirement | Usage |
|---|---|---|
PageChanged | (currentPage: number, pageSize: number) => unknownOptional | |
Error | (message: string) => unknownOptional |
Instance methods & properties
3| Name | Signature / type | Usage |
|---|---|---|
element | HTMLElement | Root owned by this instance. Dispose before removing its host. |
update | (patch: Partial<T.PaginationOptions>) => void | Apply a partial options update to this instance. |
destroy | () => void | Dispose the instance and its listeners when the view is removed. |
Use these inputs, events, actions and structures in Service Studio. Names and data bindings are specific to the native Blocks.
Included in the planned free BluKavantUI Community edition. The official OutSystems Forge release is coming soon. View Community scope →
Open OutSystems showcase ↗- Web runtime
- Supported
- TypeScript
- Supported
- OutSystems
- Supported
Statuses describe the component’s rendered code and interactions. Supply accessible content and follow the component guidance when integrating it.
Accessibility guidance →Purpose and use
Help people browse records with page numbers, page-size choices and clear navigation.
Keyboard design guidance
Tab to page buttons and selectors. Current page is announced; unavailable navigation is disabled.
See the support status above for review coverage and any limitations.
In your application
Provide useful labels, preserve visible focus, and test the component with your actual content. Use text alongside status colors and check contrast in each state.
Events0No events yet.
Interact with an example to see its events.