Tesserae

Pagination

Description

A component to navigate through pages

Pagination allows users to navigate through a large set of data by breaking it into smaller, manageable chunks called pages.

It provides controls to move between pages, jump to specific pages, and see the current position within the total set.

API reference

class

Pagination

public sealed class Pagination : ComponentBase<Pagination, HTMLElement>

A page-number navigation strip used to walk through pages of results.

Constructors

Constructor
Pagination
public Pagination(int totalItems = 0, int pageSize = 10, int currentPage = 1)

Initializes a new instance of this class.

Properties

Property
Pagination.TotalItems
public int TotalItems { get ; set ; }

Gets or sets the total items.

Property
Pagination.PageSize
public int PageSize { get ; set ; }

Gets or sets the page size.

Property
Pagination.CurrentPage
public int CurrentPage { get ; set ; }

Gets or sets the current page.

Property
Pagination.TotalPages
public int TotalPages { get ; }

Gets or sets the total pages.

Property
Pagination.MaxPageButtons
public int MaxPageButtons { get ; set ; }

Gets or sets the max page buttons.

Property
Pagination.ShowStatus
public bool ShowStatus { get ; set ; }

Shows the status.

Methods

Method
Pagination.SetTotalItems
public Pagination SetTotalItems(int totalItems)

Sets the total items of the component.

Method
Pagination.SetPageSize
public Pagination SetPageSize(int pageSize)

Sets the page size of the component.

Method
Pagination.SetPage
public Pagination SetPage(int page, bool raiseEvent = true)

Sets the page of the component.

Method
Pagination.OnPageChange
public Pagination OnPageChange(Action<Pagination> onPageChange)

Registers a callback invoked when the page change event fires.

Method
Pagination.Next
public Pagination Next()

Configures the component to next.

Method
Pagination.Previous
public Pagination Previous()

Configures the component to previous.

Method
Pagination.First
public Pagination First()

Configures the component to first.

Method
Pagination.Last
public Pagination Last()

Configures the component to last.

Method
Pagination.Render
public override HTMLElement Render()

Renders the component's root HTML element.

Samples

Basic Pagination

Small Result Set

Large Result Set

See also

© 2026 Tesserae. All rights reserved.