Skip to main content
IonBlazor package icon

IonBlazor

v0.887.15Latest Stable
net10.0net8.0net9.0

IonBlazor bundle β€” includes all components and static assets.

Published
Jul 1, 2026
3mo ago
Total Downloads
4.8K
4,752

Install

dotnet add package IonBlazor --version 0.887.15
ProductVersions
.NET
net10.0net8.0net9.0

README

IonBlazor

Ionic Framework components for Blazor, MAUI Hybrid, and ASP.NET Core Razor.

The all-in-one package: pulls in the component wrappers and every static asset bundle so a fresh project can render Ionic UI without any extra setup.

Install

dotnet add package IonBlazor

Setup

Add the Ionic script and stylesheets to your host page β€” wwwroot/index.html for Blazor WebAssembly, Pages/_Host.cshtml (or App.razor in .NET 8+) for Blazor Server, wwwroot/index.html for MAUI Hybrid:

<script type="module" src="_content/IonBlazor/@ionic/core/dist/ionic/ionic.esm.js"></script>

<link rel="stylesheet" href="_content/IonBlazor/@ionic/core/css/core.css" />
<link rel="stylesheet" href="_content/IonBlazor/@ionic/core/css/ionic.bundle.css" />

Add the namespaces to _Imports.razor:

@using IonBlazor.Components
@using IonBlazor.Components.Abstractions
@using IonBlazor.Services

Use

<IonApp>
    <IonContent>
        <IonButton OnClick="@HandleClick">Tap me</IonButton>
    </IonContent>
</IonApp>

@code {
    void HandleClick() { /* ... */ }
}

Overlay services (Controllers β†’ Services)

The four overlay controllers (IonAlertController, IonActionSheetController, IonToastController, IonLoadingController) have been replaced by scoped DI services β€” IonAlertService, IonActionSheetService, IonToastService, IonLoadingService. The old controllers are now [Obsolete(error: true)] stubs and will fail the build with a pointer to the migration recipe.

Register all four services with one call in Program.cs / MauiProgram.cs:

builder.Services.AddIonBlazor();

Then inject and call:

@inject IonAlertService AlertService

@code {
    private async Task Show()
    {
        await AlertService.PresentAsync(options =>
        {
            options.Header = "Heads up";
            options.Message = "Hello.";
        });
    }
}

Remove every <IonAlertController/>, <IonActionSheetController/>, <IonToastController/>, and <IonLoadingController/> tag from your root layout after switching. See the IonBlazor.Components README for full details including the per-service migration mapping and the dropped IonLoadingController.Create sync wrapper.

Package family

Package Use when
IonBlazor You want everything in one reference. Recommended for most apps.
IonBlazor.Components You want only the C# wrappers and will provide Ionic JS/CSS yourself.
IonBlazor.StaticAssets JavaScript interop modules used by the wrappers (transitively required).
IonBlazor.StaticAssets.Ionic The @ionic/core JavaScript bundle and CSS, served from _content/IonBlazor.
IonBlazor.StaticAssets.Ionic.Svg Ionic SVG icon set, served from _content/IonBlazor.

MAUI Hybrid multi-project caveat

In a MAUI Hybrid solution where multiple projects (e.g. a Core Razor class library and a MAUI host) all reference an asset-carrying package, MAUI's static-asset packaging fails with a duplicate-asset error.

Workaround: only one project ships the static assets. That project can use either:

  • the bundle β€” IonBlazor, or
  • the granular packages β€” IonBlazor.StaticAssets + IonBlazor.StaticAssets.Ionic (+ IonBlazor.StaticAssets.Ionic.Svg for icons), optionally with IonBlazor.Components.

Every other project references only IonBlazor.Components, which has no static assets. The component wrappers stay available everywhere; the assets ship exactly once.

Supported frameworks

net8.0, net9.0, net10.0.

Links

License

MIT.

Changes from Previous Version

No structural changes between v0.887.14 and v0.887.15.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.