Fusuma

Components / Components

pagination

Pagination for page current of total (from 1), sending the page that was pressed (the arrows send the one before and after, and cannot be pressed at the ends).

Try it

This is the Icons page of the gallery, running in your browser: pagination is on it, and it is the real widget. Press Run, then use it.

Live: Icons, where pagination is usedOpen full size

Pagination for page current of total (from 1), sending the page that was pressed (the arrows send the one before and after, and cannot be pressed at the ends).

Signature

pub const fn pagination<M>( current: u32, total: u32, on_page: fn(u32) -> M, ) -> Pagination<M>

Example

use fusuma::pagination;
let view = pagination(3, 20, |page| page);
let built = fusuma::doc::built::<u32, _>(&view);
assert!(built.texts().contains(&"3"));

All components · Source