Typen
Full mit Anzahl und Einträgen pro Seite, Simple ohne Seitengröße, Compact (mobil) mit „Seite 3 von 52“.
Navigation
Below tables and lists. Full: range in Mono, rows per page and pages; Simple: without page size; Compact: previous, "Page 3 of 52", next (used automatically when narrower than 520 px). Current page is inverted (aria-current="page"); with one page only the range is shown. Works with links or HTMX.
Full mit Anzahl und Einträgen pro Seite, Simple ohne Seitengröße, Compact (mobil) mit „Seite 3 von 52“.
erste und letzte Seite deaktivieren Zurück/Weiter; bei einer Seite steht nur die Anzahl.
Seitenwechsel lädt nur die Liste nach; die Seite steht in hx-vals (param), die Seitengröße in size_param.
<tc-pagination page pages> baut Seiten selbst; ohne href meldet tc-change die neue Seite.
| Option | Standard | Werte | Beschreibung |
|---|---|---|---|
page | 1 | – | Current page (1-based). |
pages | 'None' | – | Number of pages; derived from total and per_page when omitted. |
total | 'None' | – | Number of records for the range label. |
per_page | 25 | – | Page size. |
type | 'full' | Full, Simple or Compact. | |
href | '' | – | Link pattern with {page} and {per_page}; default: current query with the page replaced. |
param | 'page' | – | Page parameter name (query string or hx-vals). |
size_param | 'per_page' | – | Page size parameter name. |
page_sizes | '(10, 25, 50, 100)' | – | Choices of the rows-per-page select (Full only). |
siblings | 1 | – | Pages shown on each side of the current page. |
label | '' | – | Accessible name (default "Pagination"). |
size_label | '' | – | Label of the page size select (default "Rows per page"). |
range_format | '' | – | Range text, e.g. "%(start)s–%(end)s von %(total)s". |
page_format | '' | – | Compact text, e.g. "Seite %(page)s von %(pages)s". |
Zusätzliche Attribute (z. B. class, aria-*, data-*) und HTMX-Kurzformen (get, post, get_url, post_url, target, swap, trigger, confirm) werden an das Element „root“ durchgereicht.