navigations

Tailwind CSS Pagination

Pagination is a set of controls, typically buttons or links, for navigating between multiple pages of content.

Class Name
Type
Description
aria-[current=‘page’]:{tw-utility-class}ModifierMarks a pagination item as active by applying the corresponding utility class.
text-bg-{semantic-color}ModifierSets both text and background colors using the specified semantic color.
text-bg-soft-{semantic-color}ModifierApplies a soft version of text and background colors using the selected semantic color.
text-border-{semantic-color}ModifierAdds an outline styled with the chosen semantic color.

Basic pagination with the default style has been implemented. To denote the active state, we utilized aria-[current='page']:{tw-utility-class} for styling.

By applying the btn-soft modifier class, it will transform into a soft pagination type.

By applying the btn-outline modifier class, it will transform into a outline pagination type.

Default shape example.

The btn class inherently includes the rounded utility, so by applying rounded-none, we can eliminate the rounded corners, creating square-shaped pagination.

The rounded-full class rounds the “Previous” and “Next” buttons, while the btn-circle class creates circular pagination buttons.

To create smaller or larger buttons, use the btn-xs, btn-sm and btn-lg responsive classes.

To change the alignment of pagination components, use classes like justify-center to center them or justify-end to align them to the right.

On smaller screens, the text changes to an icon.

The previous button is disabled since it cannot go beyond page 1.

Mini size pagination.

Group pagination uses the Join component.

Utilize the provided code to display basic previous and next elements with icons.

Pagination variant featuring tooltips.