frontend/src/components/ui/Rocket/Pagination/Pagination.spec.md
Compound component for page navigation. Composed of nav wrapper, content list, page links, previous/next buttons, and ellipsis indicator.
| Component | Element | Purpose |
|---|---|---|
| Pagination | <nav> | Root wrapper with aria-label="pagination" |
| PaginationContent | <ul> | Flex container for items |
| PaginationItem | <li> | List item wrapper |
| PaginationLink | <a> / <button> | Individual page number link |
| PaginationPrevious | PaginationLink | "Previous" button with chevron-left |
| PaginationNext | PaginationLink | "Next" button with chevron-right |
| PaginationEllipsis | <span> | MoreHorizontal icon for truncated ranges |
| Prop | Type | Values | Default |
|---|---|---|---|
| isActive | boolean | — | false |
| disabled | boolean | — | false |
| className | string | — | — |
| Prop | Type | Values | Default |
|---|---|---|---|
| disabled | boolean | — | false |
| className | string | — | — |
| Prop | Type | Values | Default |
|---|---|---|---|
| size | string | large | default | small | default |
| className | string | — | — |
Size is set on Pagination root and flows to all sub-components via React context.
Only className prop — no variants.
| Value | Size | Tailwind |
|---|---|---|
| large | 32px | tw-size-8 |
| default | 28px | tw-size-7 |
| small | 24px | tw-size-6 |
| Value | Height | Padding | Tailwind |
|---|---|---|---|
| large | 32px | px-3 py-1 | tw-h-8 tw-px-3 tw-py-1 |
| default | 28px | px-2.5 py-1 | tw-h-7 tw-px-2.5 tw-py-1 |
| small | 24px | px-2 py-0.5 | tw-h-6 tw-px-2 tw-py-0.5 |
| Value | Size | Tailwind |
|---|---|---|
| large | 32px | tw-size-8 |
| default | 28px | tw-size-7 |
| small | 24px | tw-size-6 |
┌─ nav (pagination) ──────────────────────────────────────────────┐
│ [← Previous] [1] [2] [3] [...] [8] [9] [10] [Next →] │
└─────────────────────────────────────────────────────────────────┘
tw-gap-1), items centeredtw-size-7), rounded-md| Element | Figma token | ToolJet class |
|---|---|---|
| background | — | tw-bg-transparent |
| text | text/default | tw-text-text-default |
| font weight | weight/regular (400) | tw-font-normal |
| Element | Figma token | ToolJet class |
|---|---|---|
| background | interactive/hover | hover:tw-bg-interactive-hover |
| Element | Figma token | ToolJet class |
|---|---|---|
| background | --bg-surface-layer-01 | tw-bg-background-surface-layer-01 |
| border | border/weak | tw-border tw-border-border-weak |
| font weight | weight/medium (500) | tw-font-medium |
| text | text/default | tw-text-text-default |
| Element | Figma token | ToolJet class |
|---|---|---|
| text | cc-text/primary | tw-text-text-default |
| font | IBM Plex Sans Medium 12px | tw-text-sm tw-font-medium |
| icon color | Icons/weak | tw-text-icon-weak |
| Element | Figma token | ToolJet class |
|---|---|---|
| icon color | icon/default | tw-text-icon-default |
Shape C — sizes only. CVA on PaginationLink with size variants. isActive handled via conditional cn() merge. Size flows from Pagination root via React context.
isActive={true} prop on PaginationLink.