# `PetalComponents.Pagination`
[🔗](https://github.com/petalframework/petal_components/blob/v3.2.0/lib/petal_components/pagination.ex#L1)

Pagination is the method of splitting up content into discrete pages. It specifies the total number of pages and inidicates to a user the current page within the context of total pages.

# `pagination`

In the `path` param you can specify :page as the place your page number will appear.
e.g "/posts/:page" => "/posts/1"

## Attributes

* `path` (`:string`) - page path. Defaults to `"/:page"`.
* `class` (`:any`) - parent div CSS class. Defaults to `nil`.
* `link_type` (`:string`) - Defaults to `"a"`. Must be one of `"a"`, `"live_patch"`, `"live_redirect"`, or `"button"`.
* `event` (`:boolean`) - whether to use `phx-click` events instead of linking. Enabling this will disable `link_type` and `path`. Defaults to `false`.
* `target` (`:any`) - the LiveView/LiveComponent to send the event to. Example: `@myself`. Will be ignored if `event` is not enabled. Defaults to `nil`.
* `total_pages` (`:integer`) - sets a total page count. Defaults to `nil`.
* `current_page` (`:integer`) - sets the current page. Defaults to `nil`.
* `sibling_count` (`:integer`) - sets a sibling count. Defaults to `1`.
* `boundary_count` (`:integer`) - sets a boundary count. Defaults to `1`.
* `show_boundary_chevrons` (`:boolean`) - whether to show prev & next buttons at boundary pages. Defaults to `false`.
* Global attributes are accepted.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
