logo

S2

  • Manual
  • API
  • Examples
  • Playground
  • ChangeLog
  • Productsantv logo arrow
  • 2.x
  • Introduction
  • Quick Start
  • Basic Tutorial
    • Base Concept
    • Sheet Type
      • Pivot Mode
        Updated
      • Table Mode
    • Conditions
      Updated
    • Totals
    • Sort
      • Custom Sort
        Updated
      • Group Sort
        Updated
    • Theme
      Updated
    • Tooltip
      Updated
    • Internationalization
    • 数据格式化
      New
    • Multi Line
      New
    • Pagination
      New
  • Advanced Tutorial
    • Advanced Tutorial
      • Link
      • Render Chart In Cell
      • Draw Chart With @antv/g2
    • Custom
      • Customize Hook
        Updated
      • Customize Tree
        New
      • Customize Icon
      • Customize Cell Alignment
      • Customize Cell Size
        Updated
      • Customize Order
      • Custom Collapse/Expand Nodes
    • Interaction
      • Basic Interaction
      • Custom Interaction
      • Hide Columns
      • Cell Resize
      • Merge Cell
      • Scroll
      • Copy
        New
      • Highlight and select cell
        New
    • Analyze Component
      • Introduction
        New
      • Advanced Sort
        Updated
      • Switcher
      • Export
        Updated
      • Pagination
      • Drill Down
    • Sheet Component
      • Editable Mode
      • Strategy Sheet
        Updated
    • HD Adapter
    • Get Instance
    • Get Cell Data
      Updated
    • Table adaptive
    • AntV/G Plugins
      New
    • Pivot Chart
      Experimental
    • Vue 3.0
  • Extended Reading
    • Data Process
      • Pivot
      • Table
    • Layout
      • Pivot
      • Table
    • Performance
      Updated
  • Contribution
  • FAQ
  • S2 2.0 Migration Guide

Pagination

Previous
Export
Next
Drill Down

Resources

Ant Design
Galacea Effects
Umi-React Application Framework
Dumi-Component doc generator
ahooks-React Hooks Library

Community

Ant Financial Experience Tech
seeconfSEE Conf-Experience Tech Conference

Help

GitHub
StackOverflow

more productsMore Productions

Ant DesignAnt Design-Enterprise UI design language
yuqueYuque-Knowledge creation and Sharing tool
EggEgg-Enterprise-class Node development framework
kitchenKitchen-Sketch Tool set
GalaceanGalacean-互动图形解决方案
xtechLiven Experience technology
© Copyright 2025 Ant Group Co., Ltd..备案号:京ICP备15032932号-38

Loading...

Introduction

S2 provides built-in paging capability. It is essentially front-end pagination, click on the next page to scroll to the corresponding row.

Get started quickly

First, you need to configure the pagination attribute in s2Options

Pagination

boolean | object required , default: null Function description: Paging configuration

parameterillustratetypeDefaultsrequired
pageSizeQuantity per pagenumber-✓
currentcurrent page (starting from 1)number1✓
totalTotal number of datanumber-
preview

If you develop based on @antv/s2-core , you need to introduce or implement paging components yourself. The core layer only provides paging capabilities. Refer to the example

  • React
  • Vue 3.0

If you develop based on @antv/s2-react or @antv/s2-vue , you only need to configure pagination-related configuration items to use it out of the box.

SpreadsheetProps

<SheetComponent showPagination/>
ParameterDescriptionTypeDefaultRequired
showPaginationWhether to display the default pagination
(only if the pagination attribute is configured in options, it will take effect)
boolean{ <br>onShowSizeChange?: (pageSize: number) => void,<br> >onChange?: (current: number) => void <br>}false

📢 It should be noted that in the @antv/s2-react version, the type of showPagination is:

type ShowPagination =
| boolean
| {
onShowSizeChange?: (current: number, pageSize: number) => void,
onChange?: (current: number, pageSize: number) => void
}

React version

The Ant Design Pagination paging component is used, which supports transparent transmission API . If you need to modify the style, you can directly override it through CSS.

const s2Options = {
// https://ant.design/components/pagination-cn/#API
pagination: {}
}
<SheetComponent options={ s2Options }/>

Vue version 3.0

The Ant Design Vue paging component is used, which supports transparent transmission API . If you need to modify the style, you can directly override it through CSS.

const s2Options = {
// https://antdv.com/components/pagination#API
pagination: {}
}
< SheetComponent options={ s2Options }/>

demo address