Angular Data Table and Paginated List | ng-hub-ui-paginable
Angular data table and paginated list with server-side pagination, sorting, filtering, selection, templates and CSS variables.
API reference
Here's the full contract for paginable: everything you can bind, listen to, project and theme, gathered in one place. Wire up what you need and style what you want — it's standalone and signal-friendly.
Inputs
Dial paginable in with 10 inputs. Bind them like any Angular @Input.
| Name | Type | Default | Description |
|---|---|---|---|
dataRequired | T[] | Observable<T[]> | — | Array of data items to display in the table or Observable that emits data arrays |
headersRequired | PaginableTableHeader[] | — | Configuration array defining table columns and their properties |
pagination | PaginableTablePagination | — | Pagination configuration including page size, current page, and total items |
options | PaginableTableOptions | — | General table options including selection mode, loading state, and responsive behavior |
loading | boolean | — | Shows loading state with spinner overlay |
error | unknown | null | — | DOCS.PAGINABLE.API.INPUT.ERROR.DESCRIPTION |
loadingComponent | PaginableStateDefault | null | — | DOCS.PAGINABLE.API.INPUT.LOADING_COMPONENT.DESCRIPTION |
errorComponent | PaginableStateDefault | null | — | DOCS.PAGINABLE.API.INPUT.ERROR_COMPONENT.DESCRIPTION |
noResultsComponent | PaginableStateDefault | null | — | DOCS.PAGINABLE.API.INPUT.NO_RESULTS_COMPONENT.DESCRIPTION |
selected | T[] | — | Array of currently selected items (two-way binding supported) |
Outputs
React to what paginable does — 5 events to hook your logic onto.
| Name | Type | Description |
|---|---|---|
rowClick | TableRowEvent<T> | Emitted when a table row is clicked, includes row data and event details |
selectionChange | T[] | Emitted when row selection changes, returns array of selected items |
sortChange | PaginableTableOrdination[] | Emitted when column sorting changes, returns current sort configuration |
filterChange | FilterChangeEvent | Emitted when filters are applied or changed |
pageChange | PaginationState | Emitted when pagination changes (page number or size) |
Templates
Make it yours — 7 template slots let you project custom markup.
| Name | Description | Example |
|---|---|---|
*paginableTableHeader | Custom header template for defining custom column headers | <ng-template *paginableTableHeader="let column">{{ column.title }}</ng-template> |
*paginableTableCell | Custom cell template for customizing cell content rendering | <ng-template *paginableTableCell="let value; let row">{{ value }}</ng-template> |
*paginableTableRow | Custom row template for defining entire row structure | <ng-template *paginableTableRow="let row"><tr>...</tr></ng-template> |
*paginableTableFilter | Custom filter template for adding filtering UI elements | <ng-template *paginableTableFilter="let column"><input type="text"></ng-template> |
*paginableTableLoading | Loading state template for custom loading indicators | <ng-template *paginableTableLoading><div class="spinner"></div></ng-template> |
*paginableNoResults | Empty state template displayed when no data is available | <ng-template *paginableNoResults><p>No data found</p></ng-template> |
*paginableTableError | Error state template for handling error conditions | <ng-template *paginableTableError="let error"><p>Error: {{ error }}</p></ng-template> |
CSS variables
Theme every pixel with 69 CSS variables. Override them at :root or scope them to a wrapper.
DOCS.PAGINABLE.API.CSS_GROUP.TABLE_COLORS.TITLE
DOCS.PAGINABLE.API.CSS_GROUP.TABLE_COLORS.DESCRIPTION
| Variable | Default | Type | Description |
|---|---|---|---|
--hub-table-container-bg | var(--hub-ref-color-white, #fff) | color | Background of the entire table container. #f8f9favar(--bs-body-bg) |
--hub-table-container-color | var(--hub-sys-text-primary, #212529) | color | Default text colour inside the container. #333inherit |
--hub-table-bg | var(--hub-ref-color-white, #fff) | color | Table element background. transparent#fff |
--hub-table-color | var(--hub-sys-text-primary, #212529) | color | Table text colour. #495057 |
--hub-table-border-color | var(--hub-sys-border-color-default, #dee2e6) | color | Border colour used for table, rows and cells. #ccctransparent |
--hub-table-hover-bg | | color | Row background on hover. rgba(0,0,0,.04)#f0f4f8 |
--hub-table-hover-color | | color | Row text colour on hover. inherit |
--hub-table-striped-bg | | color | Alternating stripe row background. rgba(0,0,0,.03) |
--hub-table-striped-color | | color | Alternating stripe row text colour. inherit |
--hub-table-active-bg | var(--hub-sys-state-active-bg, rgba(0,0,0,.1)) | color | Selected/active row background. #e3f2fd |
--hub-table-active-color | var(--hub-sys-text-primary, #212529) | color | Selected/active row text colour. inherit |
DOCS.PAGINABLE.API.CSS_GROUP.TABLE_LAYOUT.TITLE
DOCS.PAGINABLE.API.CSS_GROUP.TABLE_LAYOUT.DESCRIPTION
| Variable | Default | Type | Description |
|---|---|---|---|
--hub-table-border-radius | var(--hub-ref-radius-md, 0.375rem) | length | Container corner radius. 00.5rem |
--hub-table-border-width | var(--hub-ref-border-width, 1px) | length | Border width. 02px |
--hub-table-container-gap | var(--hub-ref-space-3, 1rem) | length | Gap between container regions (top bar, table, bottom bar). 0.5rem1.5rem |
--hub-table-cell-padding-x | var(--hub-ref-space-3, 1rem) | length | Horizontal cell padding. 0.75rem1.5rem |
--hub-table-cell-padding-y | var(--hub-ref-space-2, 0.5rem) | length | Vertical cell padding. 0.25rem0.75rem |
--hub-table-cell-padding-x-sm | var(--hub-ref-space-2, 0.5rem) | length | Horizontal cell padding in small/dense mode. 0.5rem |
--hub-table-cell-padding-y-sm | var(--hub-ref-space-1, 0.25rem) | length | Vertical cell padding in small/dense mode. 0.125rem |
--hub-table-cell-vertical-align | middle | string | Vertical alignment of cell content. topbottom |
DOCS.PAGINABLE.API.CSS_GROUP.TABLE_BARS.TITLE
DOCS.PAGINABLE.API.CSS_GROUP.TABLE_BARS.DESCRIPTION
| Variable | Default | Type | Description |
|---|---|---|---|
--hub-table-top-bar-gap | var(--hub-ref-space-3, 1rem) | length | Gap between items in the top bar. 0.5rem |
--hub-table-top-bar-justify-content | end | string | Flex justify-content for the top bar. space-betweencenter |
--hub-table-bottom-bar-gap | var(--hub-ref-space-3, 1rem) | length | Gap between items in the bottom bar. 0.5rem |
--hub-table-bottom-bar-justify-content | space-around | string | Flex justify-content for the bottom bar. space-between |
--hub-table-bottom-bar-paginator-order | 1 | number | Flex order of the paginator in the bottom bar. 3 |
--hub-table-bottom-bar-settings-order | 2 | number | Flex order of the settings control. 1 |
--hub-table-bottom-bar-info-order | 3 | number | Flex order of the info text. 1 |
DOCS.PAGINABLE.API.CSS_GROUP.TABLE_SEARCH.TITLE
DOCS.PAGINABLE.API.CSS_GROUP.TABLE_SEARCH.DESCRIPTION
| Variable | Default | Type | Description |
|---|---|---|---|
--hub-table-search-border-radius | | length | Search field border radius. 0.375rem9999px |
--hub-table-search-input-bg | | color | Search input background. #fff |
--hub-table-search-input-color | | color | Search input text colour. #212529 |
--hub-table-search-button-bg | | color | Search button background. var(--bs-primary) |
--hub-table-search-button-color | | color | Search button icon/text colour. #fff |
DOCS.PAGINABLE.API.CSS_GROUP.LIST_COLORS.TITLE
DOCS.PAGINABLE.API.CSS_GROUP.LIST_COLORS.DESCRIPTION
| Variable | Default | Type | Description |
|---|---|---|---|
--hub-list-bg | | color | List host background. #ffftransparent |
--hub-list-items-bg | | color | Background of the items container. #f8f9fa |
--hub-list-item-bg | | color | Individual item background. #fff |
--hub-list-item-color | | color | Individual item text colour. #212529 |
--hub-list-item-hover-bg | | color | Item background on hover. rgba(0,0,0,.04) |
--hub-list-item-selected-bg | | color | Selected item background. #e3f2fd |
--hub-list-item-selected-color | | color | Selected item text colour. inherit |
--hub-list-item-border-color | | color | Item border colour. #dee2e6 |
DOCS.PAGINABLE.API.CSS_GROUP.LIST_LAYOUT.TITLE
DOCS.PAGINABLE.API.CSS_GROUP.LIST_LAYOUT.DESCRIPTION
| Variable | Default | Type | Description |
|---|---|---|---|
--hub-list-gap | | length | Gap between list items. 00.5rem |
--hub-list-items-gap | | length | Gap inside the items wrapper. 0.25rem |
--hub-list-padding-x | | length | Horizontal padding of the list host. 01rem |
--hub-list-padding-y | | length | Vertical padding of the list host. 00.5rem |
--hub-list-item-padding-x | | length | Horizontal padding of each item. 1rem1.25rem |
--hub-list-item-padding-y | | length | Vertical padding of each item. 0.5rem0.75rem |
--hub-list-border-radius | | length | Container border radius. 0.375rem |
DOCS.PAGINABLE.API.CSS_GROUP.LIST_CARDS.TITLE
DOCS.PAGINABLE.API.CSS_GROUP.LIST_CARDS.DESCRIPTION
| Variable | Default | Type | Description |
|---|---|---|---|
--hub-list-cards-columns | | number | Number of card columns (auto-fill when unset). 234 |
--hub-list-cards-min-column-width | | length | Minimum column width for auto-fill grid. 200px280px |
--hub-list-cards-gap | | length | Gap between cards. 0.75rem1.5rem |
--hub-list-cards-bg | | color | Card background. #fff |
--hub-list-cards-border-color | | color | Card border colour. #dee2e6 |
--hub-list-cards-border-radius | | length | Card corner radius. 0.5rem |
--hub-list-cards-shadow | | shadow | Card drop shadow. 0 2px 8px rgba(0,0,0,.1) |
--hub-list-cards-hover-shadow | | shadow | Card drop shadow on hover. 0 4px 16px rgba(0,0,0,.15) |
--hub-list-cards-padding-x | | length | Card horizontal padding. 1rem |
--hub-list-cards-padding-y | | length | Card vertical padding. 1rem |
DOCS.PAGINABLE.API.CSS_GROUP.PAGINATOR.TITLE
DOCS.PAGINABLE.API.CSS_GROUP.PAGINATOR.DESCRIPTION
| Variable | Default | Type | Description |
|---|---|---|---|
--hub-paginator-link-bg | | color | Page link background. #ffftransparent |
--hub-paginator-link-color | | color | Page link text colour. var(--bs-primary) |
--hub-paginator-link-border-color | | color | Page link border colour. #dee2e6 |
--hub-paginator-link-border-radius | | length | Page link border radius. 0.375rem9999px |
--hub-paginator-link-active-bg | | color | Active page link background. var(--bs-primary) |
--hub-paginator-link-active-color | | color | Active page link text colour. #fff |
--hub-paginator-link-hover-bg | | color | Hovered page link background. #f0f4f8 |
--hub-paginator-link-padding-x | | length | Page link horizontal padding. 0.625rem |
--hub-paginator-link-padding-y | | length | Page link vertical padding. 0.375rem |
--hub-paginator-font-size | | length | Paginator font size. 0.875rem1rem |
--hub-paginator-gap | | length | Gap between paginator controls. 0.25rem0.5rem |
--hub-paginator-info-color | | color | Pagination info text colour. #6c757d |
--hub-paginator-label-color | | color | Per-page label colour. #6c757d |
Styling and theming
No styling examples are documented yet. This section will include customization recipes and theming examples.