Skip to main content

Paginated Items

StorybookView in Storybook

Explore interactive examples and all component variations in our Storybook.

The PaginatedItems component provides a flexible pagination solution for large datasets. Built with performance in mind, it handles data slicing, page navigation, and loading states automatically. Perfect for user lists, product catalogs, search results, and any interface displaying large collections of items.

Basic Usage

Showing 1 to 10 of 100 results
...
User 1
user1@example.com
User 2
user2@example.com
User 3
user3@example.com
User 4
user4@example.com
User 5
user5@example.com
User 6
user6@example.com
User 7
user7@example.com
User 8
user8@example.com
User 9
user9@example.com
User 10
user10@example.com
Showing 1 to 10 of 100 results
...

Product Grid Layout

Showing 1 to 12 of 50 results

Product 1

Electronics

$29.52
3.3

Product 2

Clothing

$66.65
4.7

Product 3

Books

$63.86
4.6

Product 4

Home

$98.72
4.4

Product 5

Electronics

$69.98
3.8

Product 6

Clothing

$23.78
4.9

Product 7

Books

$10.45
4.9

Product 8

Home

$23.43
4.8

Product 9

Electronics

$34.51
3.1

Product 10

Clothing

$12.82
4.6

Product 11

Books

$43.99
3.6

Product 12

Home

$16.44
4.1
Showing 1 to 12 of 50 results

Loading States

Showing 1 to 8 of 25 results

Document 1

This is the description for document 1

Modified: 12/31/2025

Document 2

This is the description for document 2

Modified: 10/17/2025

Document 3

This is the description for document 3

Modified: 10/6/2025

Document 4

This is the description for document 4

Modified: 11/22/2025

Document 5

This is the description for document 5

Modified: 1/1/2026

Document 6

This is the description for document 6

Modified: 11/5/2025

Document 7

This is the description for document 7

Modified: 12/2/2025

Document 8

This is the description for document 8

Modified: 12/5/2025

Showing 1 to 8 of 25 results

Custom Empty State

No documents found

Get started by creating your first document.

Different Page Sizes

Showing 1 to 5 of 50 results
...
User 1Admin
user1@example.com
User 2Editor
user2@example.com
User 3Viewer
user3@example.com
User 4Admin
user4@example.com
User 5Editor
user5@example.com
Showing 1 to 5 of 50 results
...

Properties

PaginatedItems<Entry>

PropertyTypeDefaultDescription
dataEntry[][]Array of items to paginate and display.
perPagenumber50Number of items to display per page.
initialPagenumber1Initial page number to display.
itemsContainerClassstring''CSS classes for the items container.
children(item: Entry, index: number) => ReactNode-Function to render each item.
emptyStateReactNodeDefault empty messageCustom component to show when no items exist.
isLoadingbooleanfalseWhether to show loading state.
loadingVariant'loader' | 'skeleton''loader'Type of loading indicator to show.
showItemsCounterbooleantrueWhether to show the items counter.
counterTextstring-Custom text for the items counter.

Entry Type Constraint

Entry extends { id?: string }

Items should have an optional id property for optimal rendering performance.

Loading States

The component supports two loading variants:

  • Loader - Shows a centered spinner
  • Skeleton - Shows placeholder skeleton elements

Pagination Features

  • Automatic Pagination - Handles data slicing and page calculation
  • Navigation Controls - Previous/next buttons and page indicators
  • Items Counter - Shows current range and total items
  • Responsive Design - Works well on mobile and desktop
  • State Management - Maintains current page across data changes

Accessibility

The PaginatedItems component includes accessibility features:

  • Keyboard Navigation - Full keyboard support for pagination controls
  • Screen Reader Support - Proper ARIA labels and announcements
  • Focus Management - Clear focus indicators on interactive elements
  • Loading States - Announces loading status to screen readers
  • Page Information - Current page and total items announced

Common Use Cases

The PaginatedItems component is perfect for:

  • User Management - Display and navigate through user lists
  • Product Catalogs - Browse products with pagination
  • Search Results - Paginate through search results
  • Document Libraries - Navigate document collections
  • Data Tables - Alternative to traditional table pagination
  • Content Feeds - Display content with pagination
  • Admin Dashboards - Manage large datasets efficiently
  • E-commerce - Product listings with pagination

Best Practices

  1. Performance - Use appropriate page sizes for your data and UI
  2. Loading States - Always provide loading feedback for async data
  3. Empty States - Create meaningful empty state messages
  4. Responsive Design - Test pagination on different screen sizes
  5. Data Management - Handle data updates and page resets properly
  6. Accessibility - Test with keyboard navigation and screen readers
  7. Visual Consistency - Maintain consistent item layouts
  8. Error Handling - Handle pagination errors gracefully