Toasty.Avalonia 2.0.0

dotnet add package Toasty.Avalonia --version 2.0.0
                    
NuGet\Install-Package Toasty.Avalonia -Version 2.0.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="Toasty.Avalonia" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Toasty.Avalonia" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Toasty.Avalonia" />
                    
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 Toasty.Avalonia --version 2.0.0
                    
#r "nuget: Toasty.Avalonia, 2.0.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 Toasty.Avalonia@2.0.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=Toasty.Avalonia&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Toasty.Avalonia&version=2.0.0
                    
Install as a Cake Tool

Toasty.Avalonia

Licence: AGPL-3.0

A reusable Avalonia 12.x toast notification overlay library for .NET 10.


Features

  • Four semantic toast types -- Information, Success, Warning, Error -- plus a fully customisable Custom type.
  • Four corner positions: top-left, top-right, bottom-left, and bottom-right.
  • Three animation styles: Slide (direction inferred from position), Fade, and None.
  • Optional progress bar in Solid (single-colour) or Tricolour (three-phase colour) mode.
  • Up to two action buttons per toast, each with an Action callback.
  • Persistent mode -- toasts with buttons never auto-dismiss.
  • Icon slot that accepts any Avalonia control (path geometry, image, third-party icon, or any other control).
  • DI initialisation via AddToasty and non-DI initialisation via UseToasty on AppBuilder.
  • Multi-window support -- register a ToastyHost in each window; the service fansout to all of them.
  • Accessibility -- polite ARIA live-region and a custom automation peer (AutomationControlType.StatusBar).
  • Automatic light/dark theme variants with no dependency on FluentTheme or MaterialTheme.
  • Fully theme-agnostic card styling -- every visual value is a DynamicResource key you can override.

Quick start

1. Install

dotnet add package Toasty.Avalonia

Or add the reference directly to your .csproj:

<PackageReference Include="Toasty.Avalonia" Version="2.0.0" />

2. Include the theme

In App.axaml, add the style include after your host application's own theme:

<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             x:Class="MyApp.App"
             RequestedThemeVariant="Default">

  <Application.Styles>
    <FluentTheme />
    <StyleInclude Source="avares://Toasty.Avalonia/Themes/ToastyTheme.axaml" />
  </Application.Styles>

</Application>

3. Add the host control to your window

ToastyHost must be the last child of a Grid so that it renders on top of all other content:

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:toasty="using:Toasty.Avalonia.Controls"
        x:Class="MyApp.MainWindow">

  <Grid>

    

    <toasty:ToastyHost ZIndex="9999" />

  </Grid>

</Window>

4. Initialise the service

For applications that do not use Microsoft Dependency Injection, call UseToasty in Program.cs:

using Avalonia;
using Toasty.Avalonia.Extensions;

AppBuilder.Configure<App>()
  .UsePlatformDetect()
  .WithInterFont()
  .UseToasty(config =>
  {
    config.Animation = ToastAnimation.Slide;
  })
  .StartWithClassicDesktopLifetime(args);

For applications that use Microsoft Dependency Injection, call AddToasty on IServiceCollection:

services.AddToasty(config =>
{
  config.Animation = ToastAnimation.Slide;
});

5. Show your first toast

using Toasty.Avalonia;
using Toasty.Avalonia.Models;

// Using the static accessor (works from any class):
Toasty.Current!.Show("File saved successfully.", ToastType.Success);

// Using the injected interface (requires IToastyService injected):
_toastyService.Show("File saved successfully.", ToastType.Success);

Documentation

File Description
getting-started.md Step-by-step integration guide
configuration.md All ToastyConfiguration properties and defaults
api-reference.md Complete public API reference
theming.md Theme inclusion, resource keys, and customisation
advanced.md Programmatic dismissal, queue behaviour, icons, accessibility
sample-app.md Running and understanding the sample application

Compatibility

Requirement Version
Avalonia 12.x (>= 12.0.0)
.NET 10
Platforms Windows, macOS

Licence

Toasty.Avalonia is released under the GNU Affero General Public Licence v3.0 (AGPL-3.0).

Any application that uses this library and is distributed or offered as a network service must make its complete source code available under the same licence.

See the LICENSE file for the full licence text.

Product Compatible and additional computed target framework versions.
.NET 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
2.0.0 118 4/11/2026
1.0.0 124 2/28/2026

2.0.0 — Targets Avalonia 12.0.0 (breaking change from 1.x which targeted Avalonia 11). XAML recompiled against Avalonia 12 XAML-IL; fixes MissingMethodException at startup on Avalonia 12.0. Public API (UseToasty, ToastyHost, ToastyConfiguration, toast show/dismiss) is unchanged.