Smart.Blazor
8.1.0
See the version list below for details.
dotnet add package Smart.Blazor --version 8.1.0
NuGet\Install-Package Smart.Blazor -Version 8.1.0
<PackageReference Include="Smart.Blazor" Version="8.1.0" />
<PackageVersion Include="Smart.Blazor" Version="8.1.0" />
<PackageReference Include="Smart.Blazor" />
paket add Smart.Blazor --version 8.1.0
#r "nuget: Smart.Blazor, 8.1.0"
#:package Smart.Blazor@8.1.0
#addin nuget:?package=Smart.Blazor&version=8.1.0
#tool nuget:?package=Smart.Blazor&version=8.1.0
Smart.Blazor Component Library
Smart Blazor Components is a commercial set of 60+ Blazor UI controls. Both server-side and client-side.
Getting Started
Installation
Smart.Blazor Components are distributed as the Smart.Blazor Nuget package. You can use any of the following options:
- Install the package from command line by running dotnet add package Smart.Blazor.
- Alternatively, you can add the project from the Visual Nuget Package Manager.
- Edit the .csproj file and add a project reference
Import the Smart.Blazor namespace.
Open the _Imports.razor file of your Blazor application and add @using Smart.Blazor
Set a Theme
Open the _Host.cshtml file (server-side Blazor) or wwwroot/index.html (client-side WebAssembly Blazor) and include a theme CSS file by adding this snippet <link rel="stylesheet" href="_content/Smart.Blazor/source/smart.default.css"> You can include 14+ additional CSS themes for the Controls.
Source files
Open the _Host.cshtml file (server-side Blazor) or wwwroot/index.html (client-side WebAssembly Blazor) and include this snippet
<script src="\_content/Smart.Blazor/smart.blazor.js"></script>
<script src="\_content/Smart.Blazor/smart.elements.js"></script>
Registrations
Blazor WebAssembly
This step is mandatory for Blazor WebAssembly(client-side) and also for ASP.NET Core hosted project types. You should place the code into the Program.cs of your client project
// other usings
using Smart.Blazor;
public class Program
{
public static async Task Main( string\[\] args )
{
var builder = WebAssemblyHostBuilder.CreateDefault( args );
builder.Services
.AddSmart()
.AddBootstrapProviders()
.AddFontAwesomeIcons();
builder.Services.AddSingleton( new HttpClient
{
BaseAddress = new Uri( builder.HostEnvironment.BaseAddress )
} );
builder.RootComponents.Add<App>( "app" );
var host = builder.Build();
host.Services
.UseBootstrapProviders()
.UseFontAwesomeIcons();
await host.RunAsync();
}
}
Blazor Server
This step is going only into the Startup.cs of your Blazor Server project.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Smart.Blazor;
namespace Smart.Blazor.Demos
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddSingleton<WeatherForecastService>();
services.AddSingleton<RandomDataService>();
// Set your license key here.
Smart.Blazor.License.Key = "Your License Key";
services.AddSmart();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/\_Host");
});
}
}
}
Using Smart.Blazor Components
Use any Smart Blazor component by typing its tag name in a Blazor page e.g. <Button>Click Me</Button> If you are using client-side WebAssembly Blazor also add the following code to your .csproj file (after the closing RazorLangVersion element): <BlazorLinkOnBuild>false</BlazorLinkOnBuild>
Data binding a property
<Input Value="@text"></Input>
@code {
string text = " Hi from Smart!";
}
Events Handing
<Calendar id="calendar" OnChange=@OnChange></Calendar>
<div class="options">
<div class="caption">Events</div>
<div class="option" id="log">
@eventLog
</div>
</div>
@code {
private string eventLog;
private void OnChange(Event eventObj)
{
CalendarChangeEventDetail detail = eventObj\[" Detail & quot;\];
eventLog = detail.Value\[0\].ToString();
}
}
Alternatively you can do that:
@page "/calendar"
<Calendar OnReady="OnReady" id="calendar" ></Calendar>
<div class="options">
<div class="caption">Events</div>
<div class="option" id="log">
@eventLog
</div>
</div>
@code {
private string eventLog;
private void OnReady(Calendar calendar)
{
calendar.Changed += delegate (object sender, CalendarChangedEventArgs args)
{
string value = args.Value\[0\].ToString();
eventLog = value;
StateHasChanged();
};
}
}
OnReady
callback is called for each Blazor component, after it is initialized and rendered.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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 was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Microsoft.AspNetCore.Components.Web (>= 3.1.8)
- Microsoft.AspNetCore.Http (>= 2.2.2)
- Microsoft.CSharp (>= 4.5.0)
- Newtonsoft.Json (>= 12.0.1)
-
.NETStandard 2.1
- Microsoft.AspNetCore.Components.Web (>= 3.1.8)
- Microsoft.CSharp (>= 4.5.0)
- Newtonsoft.Json (>= 12.0.1)
-
net5.0
- Microsoft.AspNetCore.Components.WebAssembly (>= 5.0.0-rc.1.20451.17)
- Microsoft.AspNetCore.Http (>= 2.2.2)
- Microsoft.CSharp (>= 4.5.0)
- Newtonsoft.Json (>= 12.0.1)
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 |
---|---|---|
23.0.9 | 705 | 5/14/2025 |
22.0.1 | 925 | 1/30/2025 |
22.0.0 | 237 | 1/29/2025 |
21.0.51 | 211 | 1/29/2025 |
20.0.64 | 1,853 | 10/28/2024 |
20.0.62 | 426 | 10/25/2024 |
20.0.60 | 216 | 10/24/2024 |
20.0.59 | 242 | 10/24/2024 |
20.0.58 | 218 | 10/23/2024 |
20.0.57 | 245 | 10/22/2024 |
20.0.56 | 209 | 10/22/2024 |
20.0.4 | 2,583 | 9/9/2024 |
19.0.5 | 8,175 | 4/25/2024 |
18.0.6 | 3,836 | 1/19/2024 |
18.0.0 | 957 | 1/16/2024 |
17.0.89 | 836 | 1/16/2024 |
17.0.35 | 1,520 | 12/1/2023 |
17.0.6 | 2,651 | 10/26/2023 |
16.0.2 | 5,975 | 8/4/2023 |
15.2.1 | 3,510 | 5/17/2023 |
15.1.1 | 3,138 | 4/1/2023 |
15.1.0 | 1,958 | 3/31/2023 |
15.0.63 | 2,341 | 3/20/2023 |
15.0.60 | 1,954 | 3/31/2023 |
14.4.136 | 3,891 | 1/18/2023 |
14.4.39 | 4,134 | 10/28/2022 |
14.2.18 | 4,732 | 7/21/2022 |
14.2.12 | 2,126 | 7/18/2022 |
14.1.1 | 2,923 | 7/5/2022 |
14.1.0 | 2,131 | 7/5/2022 |
14.0.94 | 2,455 | 6/15/2022 |
14.0.75 | 2,490 | 6/3/2022 |
14.0.51 | 3,426 | 5/17/2022 |
14.0.45 | 2,298 | 5/14/2022 |
13.1.29 | 3,723 | 4/7/2022 |
13.1.27 | 2,177 | 4/5/2022 |
13.1.25 | 2,221 | 4/4/2022 |
13.1.21 | 2,283 | 4/2/2022 |
13.1.20 | 1,881 | 4/1/2022 |
13.1.17 | 2,190 | 3/31/2022 |
13.1.12 | 1,980 | 3/29/2022 |
13.1.2 | 2,217 | 3/23/2022 |
13.0.20 | 2,115 | 3/8/2022 |
13.0.10 | 1,985 | 2/22/2022 |
13.0.8 | 2,241 | 2/21/2022 |
12.0.35 | 2,173 | 2/15/2022 |
12.0.20 | 1,951 | 2/4/2022 |
12.0.8 | 3,348 | 1/24/2022 |
12.0.1 | 2,017 | 1/20/2022 |
11.0.46 | 2,052 | 1/4/2022 |
11.0.38 | 1,854 | 12/29/2021 |
11.0.36 | 1,791 | 12/29/2021 |
11.0.35 | 1,833 | 12/29/2021 |
11.0.16 | 2,034 | 12/9/2021 |
11.0.7 | 1,932 | 12/3/2021 |
11.0.6 | 2,465 | 12/3/2021 |
11.0.4 | 1,828 | 12/2/2021 |
11.0.3 | 1,801 | 12/2/2021 |
11.0.0 | 1,811 | 11/29/2021 |
10.2.2 | 4,550 | 10/19/2021 |
10.2.1 | 1,794 | 10/19/2021 |
10.2.0 | 1,868 | 10/19/2021 |
10.0.83 | 1,899 | 10/18/2021 |
10.0.81 | 1,898 | 10/17/2021 |
10.0.77 | 1,944 | 10/14/2021 |
10.0.74 | 1,847 | 10/13/2021 |
10.0.73 | 1,794 | 10/13/2021 |
10.0.48 | 2,169 | 9/29/2021 |
10.0.45 | 1,812 | 9/27/2021 |
10.0.44 | 1,898 | 9/26/2021 |
10.0.41 | 1,838 | 9/23/2021 |
10.0.37 | 1,805 | 9/22/2021 |
10.0.36 | 1,923 | 9/22/2021 |
10.0.35 | 1,815 | 9/22/2021 |
10.0.31 | 2,004 | 9/17/2021 |
10.0.18 | 1,942 | 8/27/2021 |
10.0.15 | 1,786 | 8/26/2021 |
10.0.14 | 1,836 | 8/24/2021 |
10.0.1 | 2,020 | 8/16/2021 |
9.4.18 | 2,143 | 7/28/2021 |
9.4.15 | 1,837 | 7/16/2021 |
9.4.13 | 1,914 | 7/15/2021 |
9.4.8 | 1,716 | 7/12/2021 |
9.4.1 | 1,974 | 7/5/2021 |
9.4.0 | 2,026 | 6/30/2021 |
9.3.115 | 1,943 | 7/2/2021 |
9.3.113 | 1,860 | 6/25/2021 |
9.3.108 | 1,921 | 6/21/2021 |
9.3.97 | 1,832 | 6/8/2021 |
9.3.92 | 1,934 | 6/3/2021 |
9.3.82 | 1,895 | 5/26/2021 |
9.3.80 | 1,868 | 5/26/2021 |
9.3.66 | 1,836 | 5/19/2021 |
9.3.54 | 1,915 | 5/10/2021 |
9.3.45 | 2,058 | 5/6/2021 |
9.3.42 | 6,137 | 5/5/2021 |
9.3.39 | 2,093 | 5/1/2021 |
9.3.38 | 1,859 | 4/30/2021 |
9.3.36 | 1,801 | 4/30/2021 |
9.3.35 | 1,974 | 4/30/2021 |
9.3.34 | 1,944 | 4/29/2021 |
9.3.33 | 1,927 | 4/29/2021 |
9.3.32 | 1,854 | 4/28/2021 |
9.3.31 | 1,858 | 4/28/2021 |
9.3.30 | 2,009 | 4/27/2021 |
9.3.29 | 1,812 | 4/27/2021 |
9.3.25 | 1,769 | 4/26/2021 |
9.3.23 | 1,871 | 4/24/2021 |
9.3.22 | 1,859 | 4/23/2021 |
9.3.21 | 1,876 | 4/23/2021 |
9.3.20 | 1,818 | 4/22/2021 |
9.3.19 | 1,846 | 4/22/2021 |
9.3.18 | 1,847 | 4/22/2021 |
9.3.17 | 1,861 | 4/22/2021 |
9.3.16 | 1,801 | 4/22/2021 |
9.3.15 | 1,846 | 4/22/2021 |
9.3.14 | 1,914 | 4/22/2021 |
9.3.12 | 1,925 | 4/22/2021 |
9.3.11 | 1,887 | 4/21/2021 |
9.3.10 | 1,834 | 4/21/2021 |
9.3.9 | 1,970 | 4/21/2021 |
9.3.8 | 1,862 | 4/20/2021 |
9.3.6 | 1,936 | 4/20/2021 |
9.3.5 | 1,931 | 4/20/2021 |
9.3.4 | 1,871 | 4/19/2021 |
9.3.3 | 1,891 | 4/18/2021 |
9.3.2 | 1,885 | 4/17/2021 |
9.2.7 | 1,951 | 4/17/2021 |
9.2.5 | 1,857 | 4/16/2021 |
9.2.2 | 1,779 | 4/15/2021 |
9.2.1 | 1,916 | 4/13/2021 |
9.2.0 | 1,970 | 4/10/2021 |
9.1.6 | 1,812 | 4/7/2021 |
9.1.5 | 2,065 | 3/25/2021 |
9.1.4 | 2,104 | 3/5/2021 |
9.1.3 | 2,141 | 2/26/2021 |
9.1.1 | 2,163 | 2/3/2021 |
9.1.0 | 2,011 | 2/3/2021 |
9.0.6 | 2,035 | 2/2/2021 |
9.0.5 | 2,034 | 1/15/2021 |
9.0.4 | 2,155 | 1/14/2021 |
9.0.3 | 2,047 | 1/11/2021 |
9.0.2 | 2,222 | 12/27/2020 |
9.0.1 | 2,256 | 12/27/2020 |
9.0.0 | 2,091 | 12/27/2020 |
8.2.0 | 3,956 | 12/22/2020 |
8.1.17 | 2,206 | 12/9/2020 |
8.1.14 | 2,074 | 12/8/2020 |
8.1.13 | 2,182 | 12/2/2020 |
8.1.12 | 2,134 | 11/26/2020 |
8.1.10 | 2,208 | 11/25/2020 |
8.1.9 | 2,067 | 11/25/2020 |
8.1.8 | 2,060 | 11/24/2020 |
8.1.7 | 2,209 | 11/5/2020 |
8.1.6 | 2,060 | 11/3/2020 |
8.1.5 | 2,175 | 11/1/2020 |
8.1.4 | 2,095 | 10/29/2020 |
8.1.3 | 2,038 | 10/13/2020 |
8.1.2 | 364 | 10/13/2020 |
8.1.1 | 342 | 10/13/2020 |
8.1.0 | 453 | 10/13/2020 |