lion/docs/components/pagination/overview.md
Pavlik Kiselev 11bbc5fff5
feat: migrated the navigation metadata from inline MD title decorations to frontmatter
* feat: migrated the navigation metadata from inline MD title decorations to frontmatter

* fix: fixed frontmatter metadate for api-table MDs

* fix: fixed frontmatter eslint issue
2025-03-19 10:08:22 +01:00

41 lines
926 B
Markdown

---
parts:
- Pagination
- Overview
title: 'Pagination: Overview'
eleventyNavigation:
key: 'Pagination: Overview'
order: 10
parent: Pagination
title: Overview
---
# Pagination: Overview
A web component that handles pagination.
```js script
import { html } from '@mdjs/mdjs-preview';
import '@lion/ui/define/lion-pagination.js';
```
```js preview-story
export const main = () => html` <lion-pagination count="20" current="10"></lion-pagination> `;
```
## Features
- You can pass the total number of pages in the `count` parameter, and the current page in the `current` parameter. If `current` is not defined it will default to the value 1.
- On a click or parameter change of `current` it will fire an event back called `current-changed`.
## Installation
```bash
npm i --save @lion/ui
```
```js
import { LionPagination } from '@lion/ui/pagination.js';
// or
import '@lion/ui/define/lion-pagination.js';
```