# Pagination Facet

> Offset-based pagination controls for a connected Facet Target.

<!-- Sources: src/Components/Facets/PaginationFacet/PaginationFacet.php; client/src/components/pagination-facet/runtime.ts; client/src/domains/facets/service/pagination-facet-manager.ts; tests/e2e/components/facets/pagination-facet.spec.ts; tests/e2e/components/facets/multi-facet-combinations.spec.ts -->

# Pagination Facet

`Pagination Facet` controls the current page for a target. It renders hidden `offset` state and receives pagination metadata from facet responses.

## Props

| Group | Prop | Default | Meaning |
| --- | --- | --- | --- |
| Settings | `target` | empty | Shared target ID. |
| Settings | `sibling_count` | `1` | Numeric page buttons shown on each side of the current page. |
| Settings | `tag` | `nav` | Root wrapper tag. |
| Settings | `aria_label` | `Pagination` | Accessible navigation label. |
| Settings | `hide_when_single_page` | `true` | Hides pagination when only one page exists. |
| Settings | `scroll_to_top` | `false` | Scrolls to the target after pagination changes. |
| Labels | `prev_label` | `Previous` | Previous button label. |
| Labels | `next_label` | `Next` | Next button label. |
| Range | `show_range` | `true` | Shows the live range summary. |
| Range | `range_label` | `Showing` | Prefix for the range summary. |
| Styling | `class`, `range_class` | component defaults | Root and range summary classes. |

## Runtime Notes

- Pagination sends `offset` for the target.
- Responses update current page, total pages, total items, per-page, and offset.
- Changing a normal facet resets pagination to page 1.
- Pagination hides on zero results even when `hide_when_single_page` is false.

The multi-facet E2E scenario verifies pagination reset after a facet value changes.
