EricksonLopez.Pagination.Blazor 0.0.0-alpha.0

This is a prerelease version of EricksonLopez.Pagination.Blazor.
dotnet add package EricksonLopez.Pagination.Blazor --version 0.0.0-alpha.0
                    
NuGet\Install-Package EricksonLopez.Pagination.Blazor -Version 0.0.0-alpha.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EricksonLopez.Pagination.Blazor" Version="0.0.0-alpha.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EricksonLopez.Pagination.Blazor" Version="0.0.0-alpha.0" />
                    
Directory.Packages.props
<PackageReference Include="EricksonLopez.Pagination.Blazor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EricksonLopez.Pagination.Blazor --version 0.0.0-alpha.0
                    
#r "nuget: EricksonLopez.Pagination.Blazor, 0.0.0-alpha.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EricksonLopez.Pagination.Blazor@0.0.0-alpha.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EricksonLopez.Pagination.Blazor&version=0.0.0-alpha.0&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=EricksonLopez.Pagination.Blazor&version=0.0.0-alpha.0&prerelease
                    
Install as a Cake Tool

EricksonLopez.Pagination.Blazor

Blazor UI components for the EricksonLopez.Pagination ecosystem.

Overview

This package provides accessible, customizable, and headless-capable pagination components for both offset-based and cursor-based pagination in Blazor (Server, WebAssembly, and Auto modes).

Installation

<PackageReference Include="EricksonLopez.Pagination.Blazor" Version="[VERSION]" />

Usage

1. Offset Pagination Component (PagedListPager)

@using EricksonLopez.Pagination.Blazor

<PagedListPager 
    PagedList="@myPagedList" 
    OnPageChanged="LoadPage" 
    Preset="PaginationUIOptions.Bootstrap" />

2. Cursor Pagination Component (CursorPagedListPager)

@using EricksonLopez.Pagination.Blazor

<CursorPagedListPager 
    PagedList="@myCursorPagedList" 
    OnNextPage="LoadNextPage" 
    OnPreviousPage="LoadPreviousPage" 
    Preset="PaginationUIOptions.Tailwind" />

Styling & Presets

You can apply CSS classes directly via parameters or globally via dependency injection.

Global Configuration (Program.cs)

Step 1: Call AddPaginationBlazor() to ensure IOptions<PaginationUIOptions> is registered:

// Program.cs — required for global theming to work
builder.Services.AddPaginationBlazor();

Step 2 (optional): Override the default CSS classes:

builder.Services.Configure<PaginationUIOptions>(options =>
{
    var preset = PaginationUIOptions.Bootstrap;
    options.ContainerClass = preset.ContainerClass;
    options.PaginationClass = preset.PaginationClass;
    options.ListClass = preset.ListClass;
    options.ItemClass = preset.ItemClass;
    options.LinkClass = preset.LinkClass;
    options.ActiveClass = preset.ActiveClass;
    options.DisabledClass = preset.DisabledClass;
});

Or use the shorthand delegate overload:

builder.Services.AddPaginationBlazor(options =>
{
    var preset = PaginationUIOptions.Bootstrap;
    options.ListClass = preset.ListClass;
    options.ItemClass = preset.ItemClass;
    options.LinkClass = preset.LinkClass;
    options.ActiveClass = preset.ActiveClass;
    options.DisabledClass = preset.DisabledClass;
});

Note: If AddPaginationBlazor() is not called, the components still work — they fall back to headless/unstyled mode. The per-component Preset parameter can always be used without any DI registration.

Pre-defined Presets

  • PaginationUIOptions.Bootstrap (Bootstrap 5)
  • PaginationUIOptions.Tailwind (Tailwind CSS)

Headless Mode

If the default markup doesn't fit your needs, you can use the HeadlessTemplate to render your own custom UI while the component manages the state and events.

<PagedListPager PagedList="@myPagedList" OnPageChanged="LoadPage">
    <HeadlessTemplate Context="pager">
        <button disabled="@(!pager.PagedList.HasPreviousPage)" @onclick="() => pager.GoToPage(pager.PagedList.Page - 1)">
            Prev
        </button>
        <span>Page @pager.PagedList.Page</span>
        <button disabled="@(!pager.PagedList.HasNextPage)" @onclick="() => pager.GoToPage(pager.PagedList.Page + 1)">
            Next
        </button>
    </HeadlessTemplate>
</PagedListPager>
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.0-alpha.0 57 8/25/2026