Table Pagination
데이터 표의 페이지와 페이지당 표시 행 수를 함께 제어하는 컴포넌트입니다.
Installation
의존성 설치
아래 코드를 복사 후 붙여넣고 사용하세요
Usage
전체 데이터 개수를 알면 totalItems를 전달하세요. 현재 범위, 전체 개수, 이동 가능 여부를 컴포넌트가 계산합니다.
Table Pagination은 항상 한 줄로 표시됩니다. 좁은 화면에서는 표와 Table Pagination을 같은 overflow-x: auto 컨테이너 안에 두어 가로 스크롤을 제공하세요.
데이터 표의 아래쪽에서만 사용하세요. 일반 목록의 페이지를 이동할 때는 Pagination을 사용합니다. 기본 페이지당 행 수 옵션은 10개, 25개, 50개이며, 선택지는 3~4개 정도로 유지하는 것을 권장합니다.
Localization
스니펫 파일 상단의 numberFormatter와 tablePaginationText를 앱의 언어에 맞게 수정하세요. 범위, 전체 개수, 페이지당 행 수와 각 컨트롤의 접근성 이름을 한곳에서 바꿀 수 있습니다.
Props
Prop
Type
totalItems?number | undefined
전체 항목 수입니다.
pageOptions?readonly number[] | undefined
페이지 범위 선택기에 노출할 페이지입니다. 생략하면 200페이지까지는 전체를, 그보다 많으면 첫·마지막·현재 주변 페이지를 자동으로 노출합니다.
hasPreviousPage?boolean | undefined
이전 페이지가 있는지 서버가 알려주는 값입니다.
hasNextPage?boolean | undefined
다음 페이지가 있는지 서버가 알려주는 값입니다.
currentPageItemCount?number | undefined
현재 페이지에 실제로 포함된 항목 수입니다. 없으면 pageSize를 사용하며, pageSize보다 크면 pageSize로 보정합니다.
value?TablePaginationValue | undefined
제어할 페이지와 페이지 크기입니다.
defaultValue?TablePaginationValue | undefined
비제어 방식으로 사용할 때의 초기 값입니다.
Default
{ page: 1, pageSize: 10 }
onValueChange?((value: TablePaginationValue, details: TablePaginationChangeDetails) => void) | undefined
페이지 또는 페이지 크기가 바뀔 때 호출됩니다.
pageSizeOptions?readonly number[] | undefined
사용자가 선택할 수 있는 페이지 크기입니다.
Default
[10, 25, 50]
disabled?boolean | undefined
모든 페이지 이동과 선택을 비활성화합니다.
Default
false
margin?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Margin on all four sides.
Cannot be combined with any bleed* prop.
m?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for margin.
Cannot be combined with any bleed* prop.
marginX?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Horizontal margin (left + right).
Cannot be combined with any bleed* prop.
mx?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for marginX.
Cannot be combined with any bleed* prop.
marginY?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Vertical margin (top + bottom).
Cannot be combined with any bleed* prop.
my?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for marginY.
Cannot be combined with any bleed* prop.
marginTop?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Top margin.
Cannot be combined with any bleed* prop.
mt?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for marginTop.
Cannot be combined with any bleed* prop.
marginRight?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Right margin.
Cannot be combined with any bleed* prop.
mr?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for marginRight.
Cannot be combined with any bleed* prop.
marginBottom?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Bottom margin.
Cannot be combined with any bleed* prop.
mb?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for marginBottom.
Cannot be combined with any bleed* prop.
marginLeft?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Left margin.
Cannot be combined with any bleed* prop.
ml?ResponsiveValue<"auto" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for marginLeft.
Cannot be combined with any bleed* prop.
bleed?ResponsiveValue<"asPadding" | "safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Negative margin on all four sides to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. If set to "safeArea", it will use the safe area inset in the same direction.
Cannot be combined with any margin* prop.
bleedX?ResponsiveValue<"asPadding" | "safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Negative x-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. If set to "safeArea", it will use the safe area inset in the same direction.
Cannot be combined with any margin* prop.
bleedY?ResponsiveValue<"asPadding" | "safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Negative y-axis margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. If set to "safeArea", it will use the safe area inset in the same direction.
Cannot be combined with any margin* prop.
bleedTop?ResponsiveValue<"asPadding" | "safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Negative top margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. If set to "safeArea", it will use the safe area inset in the same direction.
Cannot be combined with any margin* prop.
bleedRight?ResponsiveValue<"asPadding" | "safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Negative right margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. If set to "safeArea", it will use the safe area inset in the same direction.
Cannot be combined with any margin* prop.
bleedBottom?ResponsiveValue<"asPadding" | "safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Negative bottom margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. If set to "safeArea", it will use the safe area inset in the same direction.
Cannot be combined with any margin* prop.
bleedLeft?ResponsiveValue<"asPadding" | "safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Negative left margin to extend the element outside its parent. If set to "asPadding", it will use the padding value in the same direction. If set to "safeArea", it will use the safe area inset in the same direction.
Cannot be combined with any margin* prop.
bg?ScopedColorBanner | ScopedColorBg | ScopedColorPalette | (string & {}) | undefined
Shorthand for background.
background?ScopedColorBanner | ScopedColorBg | ScopedColorPalette | (string & {}) | undefinedbgGradient?"fadeMask" | "glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefined
Shorthand for backgroundGradient.
backgroundGradient?"fadeMask" | "glowMagic" | "glowMagicPressed" | "highlightMagic" | "highlightMagicPressed" | "shimmerMagic" | "shimmerNeutral" | undefinedbgGradientDirection?"to bottom" | "to bottom left" | "to bottom right" | "to left" | "to right" | "to top" | "to top left" | "to top right" | (string & {}) | undefined
Shorthand for backgroundGradientDirection.
e.g. 43deg
backgroundGradientDirection?"to bottom" | "to bottom left" | "to bottom right" | "to left" | "to right" | "to top" | "to top left" | "to top right" | (string & {}) | undefined
e.g. 43deg
color?ScopedColorFg | ScopedColorPalette | (string & {}) | undefinedborderColor?ScopedColorPalette | ScopedColorStroke | (string & {}) | undefinedborderWidth?0 | 1 | (string & {}) | undefinedborderTopWidth?0 | 1 | (string & {}) | undefinedborderRightWidth?0 | 1 | (string & {}) | undefinedborderBottomWidth?0 | 1 | (string & {}) | undefinedborderLeftWidth?0 | 1 | (string & {}) | undefinedborderRadius?"full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | 0 | (string & {}) | undefinedborderTopLeftRadius?"full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | 0 | (string & {}) | undefinedborderTopRightRadius?"full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | 0 | (string & {}) | undefinedborderBottomRightRadius?"full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | 0 | (string & {}) | undefinedborderBottomLeftRadius?"full" | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | 0 | (string & {}) | undefinedboxShadow?"s1" | "s2" | "s3" | (string & {}) | undefinedwidth?ResponsiveValue<"full" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | Dimension | (string & {})> | undefinedminWidth?ResponsiveValue<"full" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | Dimension | (string & {})> | undefinedmaxWidth?ResponsiveValue<"full" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | Dimension | (string & {})> | undefinedheight?ResponsiveValue<"full" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | Dimension | (string & {})> | undefinedminHeight?ResponsiveValue<"full" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | Dimension | (string & {})> | undefinedmaxHeight?ResponsiveValue<"full" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | Dimension | (string & {})> | undefinedtop?0 | (string & {}) | undefinedleft?0 | (string & {}) | undefinedright?0 | (string & {}) | undefinedbottom?0 | (string & {}) | undefinedpadding?ResponsiveValue<"spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefinedp?ResponsiveValue<"spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for padding.
paddingX?ResponsiveValue<"spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefinedpx?ResponsiveValue<"spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for paddingX.
paddingY?ResponsiveValue<"spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefinedpy?ResponsiveValue<"spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for paddingY.
paddingTop?ResponsiveValue<"safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefinedpt?ResponsiveValue<"safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for paddingTop.
paddingRight?ResponsiveValue<"safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefinedpr?ResponsiveValue<"safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for paddingRight.
paddingBottom?ResponsiveValue<"safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefinedpb?ResponsiveValue<"safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for paddingBottom.
paddingLeft?ResponsiveValue<"safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefinedpl?ResponsiveValue<"safeArea" | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefined
Shorthand for paddingLeft.
position?"absolute" | "fixed" | "relative" | "sticky" | undefinedoverflowX?"auto" | "hidden" | "scroll" | "visible" | undefinedoverflowY?"auto" | "hidden" | "scroll" | "visible" | undefinedzIndex?number | (string & {}) | undefinedflexGrow?0 | 1 | true | (number & {}) | undefined
If true, flex-grow will be set to 1.
flexShrink?0 | true | (number & {}) | undefined
If true, flex-shrink will be set to 1.
flexWrap?"nowrap" | "wrap" | "wrap-reverse" | true | undefined
If true, flex-wrap will be set to wrap.
justifyContent?"center" | "flex-end" | "flex-start" | "space-around" | "space-between" | undefinedjustifySelf?"center" | "end" | "start" | "stretch" | undefined
In flexbox layout, this property is ignored.
alignItems?"center" | "flex-end" | "flex-start" | "stretch" | undefinedalignContent?"center" | "flex-end" | "flex-start" | "stretch" | undefinedalignSelf?"center" | "flex-end" | "flex-start" | "stretch" | undefinedgap?ResponsiveValue<"spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.betweenText" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | 0 | Dimension | (string & {})> | undefinedgridColumn?string | undefinedgridRow?string | undefinedunstable_transform?string | undefined_active?{ bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); } | undefinedhideFrom?BreakpointThreshold | undefineddisplay?ResponsiveValue<"flex" | "none"> | undefined
Default
"flex"
direction?ResponsiveValue<"column" | "column-reverse" | "row" | "row-reverse"> | undefined
Shorthand for flexDirection.
wrap?"nowrap" | "wrap" | "wrap-reverse" | true | undefined
Shorthand for flexWrap.
align?"center" | "flex-end" | "flex-start" | "stretch" | undefined
Shorthand for alignItems.
justify?"center" | "flex-end" | "flex-start" | "space-around" | "space-between" | undefined
Shorthand for justifyContent.
grow?0 | 1 | true | (number & {}) | undefined
Shorthand for flexGrow.
shrink?0 | true | (number & {}) | undefined
Shorthand for flexShrink.
Examples
Controlled
value는 page와 pageSize를 하나의 값으로 관리합니다. 페이지당 행 수를 바꾸면 페이지가 1로 초기화되고 onValueChange가 한 번 호출됩니다.
onValueChange Details
onValueChange의 두 번째 인자는 변경 원인을 나타내는 reason과 변경 전 값인 previousValue를 제공합니다.
| reason | 발생 조건 |
|---|---|
previous | 이전 페이지 버튼을 선택했을 때 |
next | 다음 페이지 버튼을 선택했을 때 |
page-range | 표시 범위를 선택했을 때 |
page-size | 페이지당 행 수를 바꿨을 때 |
constraint | 외부에서 전달한 페이지가 유효 범위를 벗어나 보정됐을 때 |
외부 페이지가 범위를 벗어나면 보정된 값을 먼저 렌더링하고, 이후 constraint 변경을 한 번 알립니다.
Unknown Total
전체 개수를 아직 알 수 없다면 totalItems를 생략하고 hasPreviousPage, hasNextPage를 전달하세요. 이 모드에서는 현재 범위를 텍스트로 표시하며 전체 개수와 페이지 범위 선택기는 표시하지 않습니다.
currentPageItemCount를 전달하면 마지막 페이지처럼 행 수가 적은 범위를 정확히 표시합니다. 생략하면 pageSize만큼 있다고 가정하며, 일시적으로 pageSize보다 큰 값이 들어오면 pageSize로 보정합니다.
Empty
데이터가 없으면 0-0 / 총 0개를 표시합니다. 페이지 범위 선택기와 이전·다음 버튼은 비활성화되지만 페이지당 행 수는 바꿀 수 있습니다.
Large Data Sets
페이지 수가 200개 이하면 모든 페이지 범위를 자동으로 표시합니다. 200개를 넘으면 첫 페이지, 마지막 페이지, 현재 페이지 주변을 합쳐 최대 200개만 표시합니다.
표시할 페이지를 직접 정하려면 pageOptions를 전달하세요. 전달한 옵션은 모두 렌더링되며 현재 페이지는 옵션에 없더라도 자동으로 포함되므로, 큰 배열은 피하는 것이 좋습니다.
Accessibility
루트는 페이지당 행 수 설정과 페이지 이동을 묶는 group으로 렌더링됩니다. 기본 접근성 이름은 표 페이지 탐색이며, 같은 화면에 표가 여러 개 있으면 aria-label이나 aria-labelledby로 대상을 구분하세요.
페이지를 바꾼 뒤의 로딩 상태와 결과 안내는 Table Pagination이 아니라 연결된 데이터 표 영역에서 제공하세요.
Last updated on 2026. 8. 21.