Components
Documentation contentPagination
Use pagination to arrange page-navigation buttons horizontally. The model owns the current page, and each button dispatches an on-press message. Use ghost for page numbers and outline with selected for the current page. Previous and next buttons can use chevron-left and chevron-right; an ellipsis icon indicates omitted pages.
pagination

Markup
Use outline to distinguish the current page visually and selected to expose its state to accessibility tools. In a for loop, a row field or function can return outline or ghost for the variant.
Programmatic construction (Zig)
In a Zig view, the canvas.Ui builder constructs the same tree programmatically:
Attributes
| Attribute | Description |
|---|---|
selected | Selected state; often a {a == b} equality. |
on-press | Dispatch a Msg on press: tag or tag:{payload}. Legal on any element — a bound press handler makes it pressable, and presses on plain text/icons inside it fall through to it (dragging still selects text). |
icon | button, toggle-button, list-item, menu-item: vector icon drawn inline (buttons/toggle-buttons before the label, list/menu items as a leading slot): a built-in name (comptime-validated against canvas.icons.known_icon_names, e.g. save, plus, refresh-cw), an app-registered app:<name>, or one {binding} resolving to such a name. Icon-only buttons when the content is empty — add a label. One hit target, one enabled/disabled tint. |
icon-placement | Icon slot side on label-bearing buttons/toggle-buttons: leading (default) draws the icon before the label, trailing after it — the next-page chevron. Icon-only buttons center the glyph regardless. |
