# @nitro-ui/component-pagination

> Pagination styling for Nitro UI.

Latest version **1.0.10** (published 2020-01-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install @nitro-ui/component-pagination
pnpm add @nitro-ui/component-pagination
yarn add @nitro-ui/component-pagination
bun add @nitro-ui/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 | 1.0.10 |
| Published | 2020-01-20 |
| First published | 2019-10-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 21.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Ikram Hakimi |
| Maintainers | ahmedalkhoudary, ibrahimna, icarasia-engineering, ikramhakimi, knzshirox, shyyawn, sllee_1004, syaifulsz, zulazman |
| Keywords | Pagination, Nitro, UI, CSS, Components, iCarAsia |

## Links

- npm: https://www.npmjs.com/package/@nitro-ui/component-pagination
- Repository: https://github.com/icarasia/nitro-ui
- Homepage: https://github.com/icarasia/nitro-ui#readme
- Issues: https://github.com/icarasia/nitro-ui/issues
- npm.io page: https://npm.io/package/@nitro-ui/component-pagination

## Dependencies (2)

- [@nitro-ui/core](https://npm.io/package/@nitro-ui/core.md) ^1.0.7
- [@nitro-ui/component-button](https://npm.io/package/@nitro-ui/component-button.md) ^1.0.10

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.10 (latest) — 2020-01-20
- 1.0.9 — 2020-01-20
- 1.0.7 — 2019-11-18
- 1.0.6 — 2019-11-13
- 1.0.5 — 2019-11-12
- 1.0.4 — 2019-11-12
- 1.0.3 — 2019-11-11
- 1.0.2 — 2019-11-11
- 1.0.1 — 2019-11-07
- 1.0.0 — 2019-11-07
- 1.0.0-alpha.6 — 2019-10-31
- 1.0.0-alpha.5 — 2019-10-31
- 1.0.0-alpha.4 — 2019-10-23
- 1.0.0-alpha.3 — 2019-10-23
- 1.0.0-alpha.2 — 2019-10-22
- … 2 more at https://npm.io/package/@nitro-ui/component-pagination/versions

## README

# Nitro UI: Component > Pagination

Pagination styling for list or table

## Getting Started

Get latest version by installing via [NPM @nitro-ui/component-pagination](https://www.npmjs.com/package/@nitro-ui/component-pagination):

```sh
npm install @nitro-ui/component-pagination
```
**Dependencies**

Pagination style requires Nitro Button Components which already defined inside package.json. Use `c-btn-secondary` or `c-btn-secondary-outline` to render the button style. When pagination installed `@nitro-ui/component-button` will be installed together inside the node_modules. Use the button to include in your project.


## Usage

Sample markup for pagination

```html
<ul class="c-pagination">
    <li class="c-pagination__first"><span class="c-btn  c-btn--secondary-outline  is--disabled">First</span></li>
    <li class="c-pagination__previous"><a href="#" class="c-btn  c-btn--secondary-outline">Prev</a></li>
    <li class="c-pagination__item  is--active"><a href="#">1</a></li>
    <li class="c-pagination__item"><a href="#">2</a></li>
    <li class="c-pagination__item"><a href="#">3</a></li>
    <li class="c-pagination__item"><a href="#">4</a></li>
    <li class="c-pagination__item"><a href="#">5</a></li>
    <li class="c-pagination__next"><a href="#" class="c-btn  c-btn--secondary-outline">Next</a></li>
    <li class="c-pagination__last"><a href="#" class="c-btn  c-btn--secondary-outline">Last</a></li>
</ul>

```

For pagination item that currently active requires to add `is--active` class name.

**Inline Pagination**

To make the pagination inline add extra class name `c-pagination--inline` to the c-pagination

```html
<ul class="c-pagination  c-pagination--inline">
    <li class="c-pagination__first"><span class="c-btn   c-btn--secondary-outline  is--disabled">First</span></li>
    <li class="c-pagination__previous"><a href="#" class="c-btn  c-btn--secondary-outline">Prev</a></li>
    <li class="c-pagination__item  is--active"><a href="#">1</a></li>
    <li class="c-pagination__item"><a href="#">2</a></li>
    <li class="c-pagination__item"><a href="#">3</a></li>
    <li class="c-pagination__item"><a href="#">4</a></li>
    <li class="c-pagination__item"><a href="#">5</a></li>
    <li class="c-pagination__next"><a href="#" class="c-btn  c-btn--secondary-outline">Next</a></li>
    <li class="c-pagination__last"><a href="#" class="c-btn  c-btn--secondary-outline">Last</a></li>
</ul>
```



## Development

To extends, develop or contribute to this component, you're required to fork our main [repository](https://github.com/icarasia/nitro-ui) and made a pull request.

### Development Requirements

Development tools required for this component are:

- [NodeJS](https://nodejs.org/en/)
- [Grunt CLI](https://gruntjs.com)
- [Ruby](https://www.ruby-lang.org/en/) (optional)
- [SASS](https://sass-lang.com) (optional)

Ruby and SASS are optional if you're fully using [node-sass](https://github.com/sass/node-sass) from npm for development.

### Development Setup

Run:

```sh
npm install
```

### Compile

Run:

```sh
grunt
```
---

# TODO

Nothing todo for now.

---

# CHANGELOG

All notable changes to this project will be documented in this file. **For now, let's keep TODO and CHANGELOG in README file. Keeping things simple.**

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.0-beta] - 2019-10-08
### Added
- Initial setup
- Fixed CSS style for reorder the First and Last button

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