# @hi-ui/pagination

> A sub-package for @hi-ui/hiui.

Latest version **5.0.0** (published 2026-06-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hi-ui/pagination
pnpm add @hi-ui/pagination
yarn add @hi-ui/pagination
bun add @hi-ui/pagination
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2026-06-06 |
| First published | 2021-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 11 |
| Unpacked size | 95.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 879 |
| Author | HiUI |
| Maintainers | sivan, solarjoker, lanzhi_lee, zhouyun |

## Links

- npm: https://www.npmjs.com/package/@hi-ui/pagination
- Repository: https://github.com/XiaoMi/hiui
- Homepage: https://github.com/XiaoMi/hiui/tree/master/packages/ui/pagination#readme
- Issues: https://github.com/XiaoMi/hiui/issues
- npm.io page: https://npm.io/package/@hi-ui/pagination

## Dependencies (11)

- [@hi-ui/env](https://npm.io/package/@hi-ui/env.md) ^5.0.0
- [@hi-ui/icons](https://npm.io/package/@hi-ui/icons.md) ^5.0.0
- [@hi-ui/input](https://npm.io/package/@hi-ui/input.md) ^5.0.0
- [@hi-ui/button](https://npm.io/package/@hi-ui/button.md) ^5.0.0
- [@hi-ui/select](https://npm.io/package/@hi-ui/select.md) ^5.0.0
- [@hi-ui/counter](https://npm.io/package/@hi-ui/counter.md) ^5.0.0
- [@hi-ui/classname](https://npm.io/package/@hi-ui/classname.md) ^5.0.0
- [@hi-ui/use-latest](https://npm.io/package/@hi-ui/use-latest.md) ^5.0.0
- [@hi-ui/type-assertion](https://npm.io/package/@hi-ui/type-assertion.md) ^5.0.0
- [@hi-ui/use-merge-semantic](https://npm.io/package/@hi-ui/use-merge-semantic.md) ^5.0.0
- [@hi-ui/use-uncontrolled-state](https://npm.io/package/@hi-ui/use-uncontrolled-state.md) ^5.0.0

## Recent versions

- 5.0.0 (latest) — 2026-06-06
- 5.0.0-rc.0 (rc) — 2026-06-02
- 5.0.0-experimental.1 (experimental) — 2026-03-08
- 5.0.0-canary.11 (canary) — 2026-03-08
- 5.0.0-alpha.0 (alpha) — 2025-09-29
- 4.0.11-beta.0 (beta) — 2023-05-30
- 4.0.0-beta.47 (feature) — 2022-07-20
- 5.0.0-experimental.0 — 2026-02-05
- 5.0.0-canary.10 — 2025-12-15
- 5.0.0-canary.9 — 2025-11-27
- 5.0.0-canary.8 — 2025-11-19
- 5.0.0-canary.7 — 2025-11-12
- 5.0.0-canary.6 — 2025-10-16
- 5.0.0-canary.5 — 2025-08-21
- 5.0.0-canary.4 — 2025-07-06
- … 114 more at https://npm.io/package/@hi-ui/pagination/versions

## README

# `@hi-ui/pagination`

> TODO: description

## Usage

```
const Pagination = require('@hi-ui/pagination');

// TODO: DEMONSTRATE API
```

## Props

| 参数            | 说明                     | 类型     | 可选值                            | 默认值    |
| --------------- | ------------------------ | -------- | --------------------------------- | --------- |
| type  | 	分页的类型           | string   | 'default' | 'shrink'                                | 'default'        |
| defaultCurrent  | 默认的当前页数           | number   | -                                 | 1         |
| current         | 当前页数                 | number   | -                                 | -         |
| max             | 最大显示的页数           | number   | -                                 | 2         |
| pageSize        | 每页条数                 | number   | -                                 | 10        |
| pageSizeOptions | 指定每页可以显示多少条   | number[] | -                                 | []        |
| total           | 数据总数                 | number   | -                                 | -         |
| showTotal           | 是否显示数据总数                 | boolean   | -                                 | false         |
| autoHide（没做）        | 只有一页时是否隐藏分页器 | boolean  | true \| false                     | false     |
| showJumper      | 是否显示跳转             | boolean  | true \| false                     | false     |
| showPagers      | 是否显示页码             | boolean  | true \| false                     | true     |

## Events

| 名称             | 说明                       | 类型                                                      | 参数                                                                        | 返回值 |
| ---------------- | -------------------------- | --------------------------------------------------------- | --------------------------------------------------------------------------- | ------ |
| onJump           | 快速跳转时触发             | (current: number) => void                                 | current: 快速跳转页数                                                       | -      |
| onChange         | 页码改变时的回调           | (current: number, prev: number, pageSize: number) => void | current: 改变后的新页数 prev: 改变前的页数 pageSize: 每页记录数 | -      |
| onPageSizeChange | 每页显示条数改变的回调函数 | (pageSize: number, current: number) => void               | current: 当前页数 每页记录数

## CHANGELOG

| 参数         | 变更类型                        | 变更内容                                                                       | 解决的问题                   |
| ------------ | ------------------------------- | ------------------------------------------------------------------------------ | ---------------------------- |
| type        | update                          | 废弃'simple' |            |

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