Pagination
NavigationNavigation controls for paginated data with previous/next and page numbers.
Preview
...
Usage
pagination.rs
use floe_ui::components::pagination;
let nav = pagination::pagination([
pagination::previous(Some(Message::PrevPage), &tokens),
pagination::item("1", true, Message::GoToPage(1), &tokens),
pagination::item("2", false, Message::GoToPage(2), &tokens),
pagination::item("3", false, Message::GoToPage(3), &tokens),
pagination::ellipsis(&tokens),
pagination::next(Some(Message::NextPage), &tokens),
]);API Reference
Props / Parameters
| Name | Type | Description |
|---|---|---|
| label | &str | Page number label |
| is_active | bool | Whether this is the current page |
| on_press | Message | Message sent on click |
| tokens | &DesignTokens | Design tokens for theming |
Builder Functions
pagination(items)
item(label, is_active, on_press, tokens)
previous(on_press, tokens)
next(on_press, tokens)
ellipsis(tokens)
Builder functions return pre-configured Iced widgets ready for use.
Source: floe-ui/src/components/pagination.rs