Plugin.Maui.TabbarBadge
1.0.0
dotnet add package Plugin.Maui.TabbarBadge --version 1.0.0
NuGet\Install-Package Plugin.Maui.TabbarBadge -Version 1.0.0
<PackageReference Include="Plugin.Maui.TabbarBadge" Version="1.0.0" />
<PackageVersion Include="Plugin.Maui.TabbarBadge" Version="1.0.0" />
<PackageReference Include="Plugin.Maui.TabbarBadge" />
paket add Plugin.Maui.TabbarBadge --version 1.0.0
#r "nuget: Plugin.Maui.TabbarBadge, 1.0.0"
#:package Plugin.Maui.TabbarBadge@1.0.0
#addin nuget:?package=Plugin.Maui.TabbarBadge&version=1.0.0
#tool nuget:?package=Plugin.Maui.TabbarBadge&version=1.0.0
Plugin.Maui.TabbarBadge
A library to add Tabbar Badge to Shell Tabbar Items for Android and iOS using .NET MAUI.
Setup
Add the Plugin.Maui.TabbarBadge
Nuget Package to your project.
Initialize the Library in your MauiProgram.cs
:
builder
.UseMauiApp<App>()
.UseTabbarBadge() // <- Add This Line
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
})
Next you need to assign the Badge to one of your Tabs, the Tab should be setup in your AppShell.xaml
like this:
<Tab Title="Cart"
Icon="tab_cart.png"
x:Name="CartTab">
<ShellContent ContentTemplate="{DataTemplate cart:CartPage}" />
</Tab>
In the AppShell.xaml.cs
Constructor assign the Tab:
public AppShell()
{
InitializeComponent();
this.AssignBadge(CartTab); // <- Add this line
}
From now on if you want to change the badge number you can call:
BadgeCounterService.SetCount(1);
Credits
This library is based on the work done by @Abhayprince.
Check out his original Repoistory and the associated Youtube Video for more information about the process.
License
As the original sample this Library is using the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0-android35.0 is compatible. net9.0-ios18.0 is compatible. net10.0-android was computed. net10.0-ios was computed. |
-
net9.0-android35.0
- Microsoft.Maui.Controls (>= 9.0.80)
-
net9.0-ios18.0
- Microsoft.Maui.Controls (>= 9.0.80)
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 |
---|---|---|
1.0.0 | 156 | 7/7/2025 |
1.0.0-pre003 | 132 | 7/7/2025 |