# Pagination A page navigator that coordinates first, previous, next, last, and page input controls. ## Usage Use as a coordinator around `ComboBox`. ```svelte ``` ## Anatomy The `class` attribute values represent part names. Other attributes represent their corresponding props. An embedded `ComboBox` renders between the `left` and `right` buttons unless `children` is supplied. ```svelte ``` - The page commits on ComboBox blur, Enter, and option select; invalid input reverts and out-of-range input clamps. - Buttons use `aria-disabled`, stay focusable at bounds, and suppress their action while at-bound. - Part names map by position: TOP=first, LEFT=prev, RIGHT=next, BOTTOM=last. - Embedded `ComboBox` is wired through context; `comboBox` is ignored when `children` is supplied. - `onchange` fires a native `change` Event after user-initiated page changes (nav buttons or ComboBox commits); read the new page from bound `value`. Programmatic value changes and bound clamping do not fire it. - The default shortcut list is centered on the current page. A caller-provided `options` list can follow the page with `bind:value={page}` and `const opts = $derived(...)`; no change event is needed. ## Props | Name | Type | Default | Description | |---|---|---|---| | `children` | `Snippet` | - | Custom pagination content; receives value and variant | | `value` | `number` | `1` | Bindable current page | | `min` | `number` | `1` | First page | | `max` | `number` | - | Last page; defaults to `max(min, value)` | | `options` | `number[]` | - | Shortcut page numbers shown by the embedded `ComboBox` | | `top` | `Snippet` | - | FIRST button content; receives value and variant | | `left` | `Snippet` | - | PREV button content; receives value and variant | | `right` | `Snippet` | - | NEXT button content; receives value and variant | | `bottom` | `Snippet` | - | LAST button content; receives value and variant | | `ariaLabel` | `string` | `"Pagination"` | Accessible label for the nav landmark | | `buttonLabels` | `PaginationLabel` | - | Accessible labels for the buttons; defaults First/Previous/Next/Last page | | `comboBox` | `ComboBoxProps` | - | Config bag spread into the embedded `ComboBox`; uses the flat inner-prop shape and is ignored when `children` is supplied | | `styling` | `SVSClass` | - | Styling override | | `variant` | `SVSVariant` | `NEUTRAL` | Variant | Other `