New to Telerik UI for BlazorStart a free 30-day trial

First Steps with Blazor Client-Side

Updated on Apr 7, 2026

This article explains how to get the Telerik UI for Blazor components in your Blazor WebAssembly app and start using them quickly. You will create a new application from scratch, learn how to add the UI for Blazor components to a project, and finally, add a UI component to a view.

This article applies only to the Blazor WebAssembly Standalone App Visual Studio project template.

If you prefer the Blazor Web App template with WebAssembly render mode, then follow the tutorial about Blazor Web Apps.

This step-by-step tutorial starts with the basics and is suitable for first-time Blazor or Telerik component users. If you are already familiar with the Telerik license key, NuGet source, components, and Blazor in general, you may prefer the Telerik UI for Blazor Workflow Details article. It provides more setup options and suggests possible enhancements.

Prerequisites

To successfully complete the steps in this tutorial:

  1. Install a supported .NET version.
  2. Create a Telerik user account if you haven't one.
  3. Activate a Telerik UI for Blazor trial if you don't have a commercial license.

Step 0: Set Up Telerik Development Environment

The fastest way to set up your Telerik development environment is to use the Telerik CLI .NET tool. Run the following commands in your preferred command shell (Visual Studio Terminal, cmd, PowerShell, Bash, macOS Terminal, or other):

  1. Install Telerik CLI

    SH
    dotnet tool install -g Telerik.CLI
  2. Run the Telerik CLI setup command:

    SH
    telerik setup

The setup command performs multiple actions at once to configure your Telerik development environment:

Step 1: Create a New Project

To create a new Blazor app:

  1. Оpen your preferred IDE or run the dotnet new .NET CLI command.
  2. Use the Blazor WebAssembly Standalone App project template.

Step 2: Install the Telerik UI for Blazor Components

Add the Telerik.UI.for.Blazor NuGet package to every project that will use the Telerik Blazor components.

Step 3: Enable the Blazor UI Components

To enable the Telerik UI for Blazor components, you must add several client-side dependencies to the application, include the required @using statements, add the TelerikRootComponent component, and register the Telerik Blazor service.

3.1. Add the Telerik UI for Blazor Client Assets

  1. Add the telerik-blazor.js file to the wwwroot/index.html file as a static asset.

    HTML
    <head>
        . . .
        <script src="_content/Telerik.UI.for.Blazor/js/telerik-blazor.js"></script>
    </head>
  2. Add a theme stylesheet as a static asset in the index.html file.

    HTML
    <head>
        . . .
        <link rel="stylesheet" href="_content/Telerik.UI.for.Blazor/css/kendo-theme-default/all.css" />
    </head>

3.2. Include @using Statements

In the ~/_Imports.razor file, add the @using directives below. This configures the project to recognize the Telerik components in all files. You can register one or both icon namespaces, depending on the icon type you will be using.

_Imports.razor

RAZOR
@using Telerik.Blazor
@using Telerik.Blazor.Components
@using Telerik.SvgIcons
@using Telerik.FontIcons

3.3. Add the TelerikRootComponent

Use a single TelerikRootComponent component as a top-level component in the Blazor client-side app.

Add a <TelerikRootComponent> to the app layout file (by default, MainLayout.razor). Make sure that the TelerikRootComponent wraps all the content in the MainLayout.

MainLayout.razor

RAZOR
@inherits LayoutComponentBase

<TelerikRootComponent>
    @* existing MainLayout.razor content here *@
</TelerikRootComponent>

You can learn more about the TelerikRootComponent purpose and usage in its dedicated documentation.

3.4. Register the Telerik Blazor Service

In the ~/Program.cs file of the client web application, register the Telerik Blazor service.

C#
using ClientBlazorProject;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;

// sample host builder for a WASM app, yours may differ
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");

builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });

// Register the Telerik services.
builder.Services.AddTelerikBlazor();

await builder.Build().RunAsync();

Now your project can use the Telerik UI for Blazor components.

Step 4: Add a Component to a View

The final step in this tutorial is to use a Telerik UI for Blazor component in a view and run it in the browser.

  1. In the ~/Pages/Index.razor view, add a TelerikButton component.

    Home.razor

    RAZOR
    <TelerikButton ThemeColor="@ThemeConstants.Button.ThemeColor.Primary"
                   OnClick="@OnButtonClick">Say Hello</TelerikButton>
    
    <p>@HelloString</p>
    
    @code {
        private MarkupString HelloString { get; set; }
    
        private void OnButtonClick()
        {
            HelloString = new MarkupString($"Hello from <strong>Telerik UI for Blazor</strong> at {DateTime.Now.ToString("HH:mm:ss")}!" +
                "<br /> Now you can use C# to write front-end!");
        }
    }
  2. Run the app in the browser. You should see something like this:

    Telerik Blazor app in the browser

Well done! Now you have your first Telerik UI for Blazor component running in your Blazor app, showcasing the power of front-end development with Blazor.

Next Steps

Use Telerik AI Tools
 
Telerik UI for Blazor provides AI-powered development assistance through a unified MCP server that delivers intelligent, context-aware help directly in your IDE.
Use Components
 
Check the list of available Telerik Blazor components.
Browse Online Demos
 
Explore the live Telerik UI for Blazor examples.
Learn Telerik Data Binding
 
Learn the data binding fundamentals for Telerik UI for Blazor components.
Get Started with Data Grid
 
Bind the Telerik Blazor Grid to data and choose from the large variety of built-in features.
Create Themes
 
Review the built-in themes, customize them, or create your own.

See Also