Get started
Theme:

Get started

1. Install

Radzen Blazor Components are distributed as the Radzen.Blazor nuget package.

You can add them to your project in one of the following ways

  • Install the package from command line by running dotnet add package Radzen.Blazor
  • Add the project from the Visual Nuget Package Manager
  • Manually edit the .csproj file and add a project reference

2. Import the namespace

Open the _Imports.razor file of your Blazor application and add this line @using Radzen.Blazor.

3. Include a theme

  1. Download the Radzen.Blazor.Themes.zip and unzip it somewhere. It contains two directorires: fonts and css.
  2. Copy those two directories to the wwwroot folder of your Blazor application.
  3. Open the _Host.cshtml file (server-side Blazor) or wwwroot/index.html (client-side Blazor) and include a theme CSS file by adding this snippet <link rel="stylesheet" href="css/default.css">

4. Use a component

Use any Radzen Blazor component by typing its tag name in a Blazor page e.g. <RadzenButton Text="Hi"></RadzenButton>

If you are using client-side Blazor also add the following code to your .csproj file (after the closing RazorLangVersion element):

<BlazorLinkOnBuild>false</BlazorLinkOnBuild>

It is a workaround for a known issue when using IQueryable.

Data-binding a property


<RadzenButton Text="@text"></RadzenButton>
@code {
  string text = "Hi";
}

Handing events


<RadzenButton Click="@ButtonClicked" Text="Hi"></RadzenButton>
@code {
  void ButtonClicked()
  {
    //
  }
}