diff --git a/docs/README.md b/docs/README.md index 742b65f..32860cd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -69,6 +69,13 @@ Modal dialog component for displaying content in an overlay. - Visibility controlled via Blazor state - No JavaScript interop required +#### [Pagination](components/pagination.md) +Pagination control for navigating large data sets across multiple pages. +- Full and simple view modes +- Ellipsis truncation via `PageRangeSize` +- Optional jump-to-page input and total-items summary +- Customizable previous/next buttons and alignment + ### Form Components BitBlazor provides a comprehensive set of form components that integrate seamlessly with ASP.NET Core Blazor's form system and Bootstrap Italia styling. diff --git a/docs/components/pagination.md b/docs/components/pagination.md new file mode 100644 index 0000000..2b0b724 --- /dev/null +++ b/docs/components/pagination.md @@ -0,0 +1,360 @@ +# BitPagination + +The `BitPagination` component provides a [pagination control using Bootstrap Italia styles](https://italia.github.io/bootstrap-italia/docs/componenti/paginazione/). + +## Namespace + +```csharp +BitBlazor.Components +``` + +## Description + +The Pagination component enables users to navigate through large data sets split across multiple pages. It renders previous/next buttons, individual page links with optional ellipsis truncation, and optional extras such as a jump-to-page input and a total-items summary. Two view modes are available: the default full control and a compact simple mode. + +`BitPagination` supports both **interactive** and **static SSR** render modes. In interactive mode, page changes are handled via two-way binding with `@bind-Page`. In SSR mode, supply a `PageLinkGenerator` to render real `` links that trigger full browser navigation — no JavaScript required. + +## Parameters + +| Name | Type | Required | Default | Description | +|------|------|----------|---------|-------------| +| `NumberOfPages` | `int` | ✓ | `1` | Total number of pages in the data set. | +| `Description` | `string` | ✓ | `""` | Text placed in the `aria-label` of the wrapping `