# @ecl-twig/ec-component-pagination

> ECL-Twig Pagination

Latest version **2.39.0** (published 2021-08-17) · EUPL-1.1 license · 0 weekly downloads

## Install

```sh
npm install @ecl-twig/ec-component-pagination
pnpm add @ecl-twig/ec-component-pagination
yarn add @ecl-twig/ec-component-pagination
bun add @ecl-twig/ec-component-pagination
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.39.0 |
| Published | 2021-08-17 |
| First published | 2019-06-14 |
| Weekly downloads | 0 |
| License | EUPL-1.1 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | European Commission |
| Maintainers | yhuard, planctus, kalin.chernev |
| Keywords | ecl, europa-component-library, design-system, twig |

## Links

- npm: https://www.npmjs.com/package/@ecl-twig/ec-component-pagination
- Repository: https://github.com/ec-europa/ecl-twig
- Issues: https://github.com/ec-europa/ecl-twig/issues
- npm.io page: https://npm.io/package/@ecl-twig/ec-component-pagination

## Dependencies (1)

- [@ecl-twig/ec-component-link](https://npm.io/package/@ecl-twig/ec-component-link.md) 2.39.0

## Recent versions

- 2.39.0 (latest) — 2021-08-17
- 2.38.0 — 2021-05-05
- 2.37.0 — 2021-03-08
- 2.36.0 — 2021-02-15
- 2.35.2 — 2021-02-09
- 2.35.1 — 2020-12-21
- 2.35.0 — 2020-11-27
- 2.34.0 — 2020-10-08
- 2.33.2 — 2020-10-01
- 2.33.1 — 2020-09-29
- 2.33.0 — 2020-09-18
- 2.32.0 — 2020-09-03
- 2.31.1 — 2020-08-24
- 2.31.0 — 2020-07-28
- 2.30.0 — 2020-07-22
- … 29 more at https://npm.io/package/@ecl-twig/ec-component-pagination/versions

## README

# ECL-Twig Pagination component

npm package: `@ecl-twig/ec-component-pagination`

```shell
npm install --save @ecl-twig/ec-component-pagination
```

### Parameters

- **"label"** (string) (default: ''): for screen reader
- **"items"** (array) (default: []):
  - "type" (string) (default: ''): could be 'previous', 'current' or 'next'
  - "label" (string) (default: ''): label used when the item is not a link
  - "aria_label" (string) (default: '')
  - "link" (object) (default: ''): object of type Link
- **"extra_classes"** (optional) (string) (default: '') Extra classes (space separated)
- **"extra_attributes"** (optional) (array) (default: []) Extra attributes
  - "name" (string) Attribute name, eg. 'data-test'
  - "value" (string) Attribute value, eg: 'data-test-1'
- **"\_compliance\_"** (optional) (boolean) (default: false): Activates the debug
- **"\_compliance_inner_check\_"** (optional) (boolean) (default: false): Inline compliance report

### Example:

<!-- prettier-ignore -->
```twig
{% include '@ecl-twig/ec-component-pagination/ecl-pagination.html.twig' with { 
  label: 'Pagination', 
  items: [ 
    { 
      type: 'previous', 
      aria-label: 'Go to previous page', 
      link: { 
        link: { 
          path: '/example#previous', 
          label: 'Previous', 
          icon_position: 'before', 
        } 
        icon: { 
          path: 'path/to/icons.svg', 
          type: 'ui', 
          name: 'corner-arrow', 
          size: 'xs', 
          transform: 'rotate-270', 
        }, 
      }, 
    }, 
    { 
      aria-label: 'Go to page 24', 
      link: { 
        link: { 
          path: '/example#page-24', 
          label: '24', 
        }, 
      }, 
    }, 
    ... 
    { 
      type: 'current', 
      aria-label: 'Page 26', 
      label: '26', 
    }, 
    ... 
    { 
      type: 'next', 
      aria-label: 'Go to next page', 
      link: { 
        link: { 
          path: '/example#next', 
          label: 'Next', 
          icon_position: 'after', 
        } 
        icon: { 
          path: 'path/to/icons.svg', 
          type: 'ui', 
          name: 'corner-arrow', 
          size: 'xs', 
          transform: 'rotate-90', 
        }, 
      }, 
    }, 
  ], 
} %}
```

---
_Source: https://npm.io/package/@ecl-twig/ec-component-pagination · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
