Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Installation

    This article shows you how to add Radzen Blazor components to your project.

    1. Install the Nuget package
    2. Import the namespaces
    3. Include the CSS and JS

    Install the Nuget package

    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 ``

    Import the namespaces

    Open the _Imports.razor file of your Blazor application and add these two lines:

    @using Radzen
    @using Radzen.Blazor
    

    Include the CSS and JS

    Include CSS

    Radzen Blazor components come with five free themes: Material, Standard, Default, Dark, Software and Humanistic.

    To use a theme

    1. Pick a theme. The online demos allow you to preview the available options via the theme dropdown located in the header. The Material theme is currently selected by default.
    2. Include the theme CSS file in your Blazor application. Open Pages\_Layout.cshtml (Blazor Server .NET 6+), Pages\_Host.cshtml (Blazor Server before .NET 6) or wwwroot/index.html (Blazor WebAssembly) and include the CSS file of a theme CSS file by adding this snippet
      <link rel="stylesheet" href="_content/Radzen.Blazor/css/material-base.css">
      

    To include a different theme (i.e. Standard) just change the name of the CSS file:

    <link rel="stylesheet" href="_content/Radzen.Blazor/css/standard-base.css">
    

    Include the JS

    Open Pages\_Layout.cshtml (Blazor Server .NET 6+), Pages\_Host.cshtml (Blazor Server before .NET 6) or wwwroot/index.html (Blazor WebAssembly) and include a theme CSS file by adding this snippet:

    <script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
    

    Next steps

    You are now ready to use Radzen Blazor components! Check Using a component to see how to add a Radzen Blazor component to your page.

    Some components require additional setup:

    • Context menu
    • Dialog
    • Notification
    • Tooltip

    Boost your Blazor development with Radzen

    Radzen is a desktop tool that gives you the power to create line of business applications. Build and launch Blazor apps visually, while we generate clean code for you.

    Learn More

    Download Radzen
    Download Radzen
    In This Article
    Back to top Radzen Blazor Components, © 2018-2022 Radzen. Source Code licensed under MIT