Paginator
A compact page indicator for multi-page flows — render it as dots or a numeric n/total via a custom labelBuilder. Navigate with ←/→, h/l or PgUp/PgDn.
Install the package
Every component ships in the single dart_tui package.
$dart pub add dart_tui

PaginatorModel(
page: 0,
totalPages: 5,
// Optional custom label, e.g. "3 / 5"
labelBuilder: (page, total) => '${page + 1} / $total',
);PaginatorModel
| Property | Type | Description |
|---|---|---|
| page | int | Current page index. |
| totalPages | int | Total number of pages (> 0). |
| labelBuilder | String Function(int, int)? | Custom renderer; defaults to dots. |
Keybindings
← / h / pgupPrevious page
→ / l / pgdnNext page