Pagination

Navigation controls for moving between pages of content.

Source Tailwind CSS

Installation

templui add pagination

Examples

With Helper

API Reference

Required parameter
Hover for description

Pagination

Root navigation container for pagination controls.

Name Type Default
ID

Unique identifier for the pagination nav element.

string
-
Class

Additional CSS classes to apply to the pagination container.

string
-
Attributes

Additional HTML attributes to apply to the pagination element.

templ.Attributes
-

Content

List container that holds pagination items.

Name Type Default
ID

Unique identifier for the content list element.

string
-
Class

Additional CSS classes to apply to the content list.

string
-
Attributes

Additional HTML attributes to apply to the content element.

templ.Attributes
-

Item

Individual list item that wraps pagination links or buttons.

Name Type Default
ID

Unique identifier for the item element.

string
-
Class

Additional CSS classes to apply to the item.

string
-
Attributes

Additional HTML attributes to apply to the item element.

templ.Attributes
-

Previous

Navigation button for going to the previous page.

Name Type Default
ID

Unique identifier for the previous button.

string
-
Class

Additional CSS classes to apply to the button.

string
-
Attributes

Additional HTML attributes to apply to the button element.

templ.Attributes
-
Href

URL for the previous page.

string
-
Disabled

Whether the previous button is disabled (e.g., on first page).

bool
false
Label

Text label to display alongside the chevron icon.

string
-

Next

Navigation button for going to the next page.

Name Type Default
ID

Unique identifier for the next button.

string
-
Class

Additional CSS classes to apply to the button.

string
-
Attributes

Additional HTML attributes to apply to the button element.

templ.Attributes
-
Href

URL for the next page.

string
-
Disabled

Whether the next button is disabled (e.g., on last page).

bool
false
Label

Text label to display alongside the chevron icon.

string
-