# Shadcn Rows Per Page

> Rows per page select with range info and first/prev/next/last icons

- Type: example, free and open source (MIT)
- Component: [Pagination](https://reui.io/components/pagination.md)
- Page: https://reui.io/components/pagination/c-pagination-12
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/pagination.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/pagination.md
- MCP: `get_example("c-pagination-12")`
- Registry item: https://reui.io/r/styles/base-nova/c-pagination-12.json
- Uses: Native Select, Pagination

## Best for

A footer with no page numbers: a rows per page select on the left, and a 1-25 of 100 range with 4 jump icons on the right

## Agent notes

- The 1-25 of 100 text is typed apart from the `NativeSelect` `defaultValue` of 25; compute the range from your page size and total
- Rows per page sits in a `span`, so the `NativeSelect` has no accessible name; pass it an `aria-label`

## When not to use

- A footer that also lists numbered page links between the arrows: use [Info & Per-Page](https://reui.io/components/pagination/c-pagination-15.md) (`get_example("c-pagination-15")`)

## Install

```bash
npx shadcn@latest add @reui/c-pagination-12
```

## About Shadcn Pagination

### When to use

- Numbered page links between previous and next controls under a list, a table or search results
- Compact pagers of back and forward controls alone or beside a page count, for narrow spaces
- Table footers pairing page controls with a rows per page select, a range count or a page jump field

### When not to use

- A records table that sorts and filters its rows and needs its pager built in: use [Data Grid](https://reui.io/components/data-grid.md) (`get_component("data-grid")`)
- A whole table section with a title, toolbar, rows and a working pager: use the [Base blocks](https://reui.io/blocks/data-grid/base.md)
- Page controls kept in local state that run click handlers, with no URL per page: use [Button Group](https://reui.io/components/button-group.md) (`get_component("button-group")`)

### Agent notes

- `PaginationLink` renders its own anchor and takes neither `render` nor `asChild`; swap that anchor for your router link in your copy of the component
- Every `href` is a hash placeholder and each page number, count and current page is typed in; derive them from your page state or URL

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
