Pager

Provides a navigation menu with shortcuts for all kinds of paginated data.

Assign data-ts="Pager" to a menu or nav to initialize it as a Pager. The component may be configured in HTML, complete with an inline callback, like in this example.

  • <menu data-ts="Pager"
    	data-ts.pages="8"
    	data-ts.page="0"
    	data-ts.onselect="console.log(this.page)">
    </menu>

— or you can configure it via a JavaScript API, like in this example.

ts.ui.get('#mypager', pager => {
	pager.pages = 8;
	pager.page = 0;
	pager.onselect = function(page) {
		console.log(page);
	};
});

As you can see, the Pager has no default outline and this will make it easier to embed into other components. Here's a short summary of the Pagers properties and methods.

If you find a bug or need a feature…

  • Create GitHub Issue…