<!-- Generated by scripts/generate-web-components.js. Do not edit directly. -->

# PaginationGroup

Navigates a finite collection of numbered pages.

```html
<noora-pagination-group current-page="2" number-of-pages="10"></noora-pagination-group>
```

## Attributes

| Attribute | Type or allowed values | Default | Description |
| --- | --- | --- | --- |
| `current-page` | `number` | `1` | Sets the selected page. |
| `number-of-pages` | `number` | `1` | Sets the total page count. |
| `href-template` | `string` | None | Sets link locations by replacing `{page}` with the page number. |

## Events

| Event | Type | Description |
| --- | --- | --- |
| `noora-page-change` | `CustomEvent<{ page: number }>` | Emitted when a page control is activated. |

## Styling parts

| Part | Description |
| --- | --- |
| `pagination` | The pagination container. |
| `page` | Each page control. |
| `previous` | The previous-page control. |
| `next` | The next-page control. |

Page activation emits a `noora-page-change` event.

## Page positions

Compare the first, middle, last, and second page positions.

```html
<noora-pagination-group current-page="1" number-of-pages="12"></noora-pagination-group>
<noora-pagination-group current-page="6" number-of-pages="12"></noora-pagination-group>
<noora-pagination-group current-page="12" number-of-pages="12"></noora-pagination-group>
<noora-pagination-group current-page="2" number-of-pages="12"></noora-pagination-group>
```

## Page counts

Show ellipsis behavior across small and large collections.

```html
<noora-pagination-group current-page="3" number-of-pages="5"></noora-pagination-group>
<noora-pagination-group current-page="25" number-of-pages="50"></noora-pagination-group>
<noora-pagination-group current-page="500" number-of-pages="999"></noora-pagination-group>
```

## Edge cases

Handle one-page, two-page, and near-boundary collections.

```html
<noora-pagination-group current-page="1" number-of-pages="1"></noora-pagination-group>
<noora-pagination-group current-page="1" number-of-pages="2"></noora-pagination-group>
<noora-pagination-group current-page="2" number-of-pages="2"></noora-pagination-group>
<noora-pagination-group current-page="3" number-of-pages="20"></noora-pagination-group>
<noora-pagination-group current-page="18" number-of-pages="20"></noora-pagination-group>
```
