About
Pagination lets users step through pages of content. Place it below a table, list, or card grid so users can move forward and backward through results. Pick a variant to match the context: numbered pages for data tables, a count for large lists, compact for tight spaces, or dots for carousels. Astryx by Meta. Source: https://astryx.atmeta.com/components/Pagination
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Pagination to your project and fits it to your theme.
Code
How Astryx Pagination is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
'use client';
/* Copyright (c) 2026 Meta Platforms, Inc. See MIT notice in astryx-pagination.tsx. */
import '@/components/ui/astryx-pagination-utils/astryx-preview.css';
import {useState} from 'react';
import {Pagination} from '@/components/ui/astryx-pagination';
import {Stack} from '@astryxdesign/core/Layout';
function OfficialSample() {
const [pagesPage, setPagesPage] = useState(3);
const [countPage, setCountPage] = useState(2);
const [compactPage, setCompactPage] = useState(5);
const [dotsPage, setDotsPage] = useState(3);
return (
<Stack direction="vertical" gap={5} hAlign="center" style={{width: '100%'}}>
<Pagination
label="Dots pagination"
page={dotsPage}
onChange={setDotsPage}
totalPages={8}
variant="dots"
/>
<Pagination
label="Compact pagination"
page={compactPage}
onChange={setCompactPage}
totalPages={10}
variant="compact"
/>
<Pagination
label="Count pagination"
page={countPage}
onChange={setCountPage}
totalItems={200}
pageSize={20}
variant="count"
/>
<Pagination
label="Pages pagination"
page={pagesPage}
onChange={setPagesPage}
totalItems={200}
pageSize={10}
variant="pages"
/>
</Stack>
);
}
export default function Demo() {
return (
<div className="astryx-demo" data-astryx-theme="neutral" data-theme="light">
<div className="astryx-demo-content" data-centered style={{maxWidth: 550}}>
<OfficialSample />
</div>
</div>
);
}















