# Getting Started with Telerik UI for Blazor

This article explains how to use the Telerik UI for Blazor components in a Blazor web applications. You will set up your Telerik development environment, create a new application from scratch, and finally, add a UI component to a Razor file.

> tip 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](https://www.telerik.com/blazor-ui/documentation/getting-started/workflow-details) article. It provides more setup options and suggests possible enhancements.

<CtaPanelIntroduction></CtaPanelIntroduction>

## Prerequisites

To successfully complete the steps in this tutorial, install a [supported .NET version](https://www.telerik.com/blazor-ui/documentation/system-requirements#supported-net-versions).

## Set Up Telerik Development Environment

The fastest way to set up your Telerik development environment is to use the [Telerik CLI](https://www.telerik.com/blazor-ui/documentation/installation/telerik-cli) .NET tool. Run the following commands in your preferred command shell (Visual Studio Terminal, cmd, PowerShell, Bash, macOS Terminal, or other).

> tip If you have already set up your Telerik development environment and it doesn't need updating, skip to [Create New Blazor App](https://www.telerik.com/blazor-ui/documentation/getting-started/web-app#create-new-blazor-app).

1. Install Telerik CLI
   ```SH.skip-repl
   dotnet tool install -g Telerik.CLI --source https://api.nuget.org/v3/index.json
   ```

2. Run the Telerik CLI `setup` command:
   ```SH.skip-repl
   telerik setup blazor
   ```

The [`setup` command performs multiple actions](https://www.telerik.com/blazor-ui/documentation/installation/telerik-cli#set-up-telerik-environment) to configure your Telerik development environment:

* Create your Telerik account or log in if you already have one.
* Activate a Telerik UI for Blazor trial if you don't have an active license.
* Download your Telerik license key.
* Configure the Telerik NuGet package source.
* Install the Telerik UI for Blazor MCP server.
* Install the Telerik UI for Blazor project templates.

## Create New Blazor App

This section assumes that you have successfully installed the [Telerik UI for Blazor project templates](https://www.telerik.com/blazor-ui/documentation/installation/project-templates) in the [previous step](https://www.telerik.com/blazor-ui/documentation/getting-started/web-app#set-up-telerik-development-environment).

To create a new Telerik Blazor app, use your preferred approach:

<TabStrip>
<TabStripTab title=".NET CLI">

Use the .NET CLI `dotnet new` command to create a new Blazor Web App or WebAssembly Standalone App, depending on your preferences:

* Create a Blazor Web App with interactive Server render mode
  ```SH.skip-repl
  dotnet new telerik-blazor -o TelerikBlazorWebApp1 -int Server
  ```

* Create a Blazor WebAssembly Standalone App
  ```SH.skip-repl
  dotnet new telerik-blazorwasm -o TelerikBlazorWasmApp1
  ```

</TabStripTab>
<TabStripTab title="Visual Studio or VS Code">

Create a new app by using one of the following project templates:

* Telerik Blazor Web App
* Telerik Blazor WebAssembly Standalone App

</TabStripTab>
<TabStripTab title="Telerik CLI">

Run the following Telerik CLI command to create a new Telerik Blazor app interactively:

```SH.skip-repl
telerik create blazor
```

</TabStripTab>
</TabStrip>

> A [Telerik Blazor Hybrid App template](https://www.telerik.com/blazor-ui/documentation/getting-started/hybrid-blazor) is also available, but it's outside the scope of this tutorial.

> To manually add Telerik UI for Blazor to an existing Blazor app, follow the [Workflow Details](https://www.telerik.com/blazor-ui/documentation/getting-started/workflow-details) article.

Upon successful run in a web browser, the new Telerik Blazor app looks like this:

![Telerik UI for Blazor app screenshot](https://www.telerik.com/blazor-ui/documentation/assets/d63af9f09ef44a20ae2231f200471b28/telerik-blazor-app-screenshot.png)

## Add Telerik Component

Add a `TelerikButton` component in `Home.razor`:

> caption Home.razor

```RAZOR
<TelerikButton OnClick="@OnButtonClick">
    Telerik Blazor Button
</TelerikButton>

<p>@ButtonClickLog</p>

@code {
    private string ButtonClickLog { get; set; } = string.Empty;

    private void OnButtonClick()
    {
        ButtonClickLog = $"Telerik Button clicked at {DateTime.Now.ToString("HH:mm:ss.fff")}.";
    }
}
```

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

<article-card-container>
    <article-card
        href="/ai/overview"
        src="/blazor-ui/documentation/assets/1a95789349616f5a96ee349e0f03d262/chat_light_large.svg"
        title="Use Telerik AI Tools"
        darkSrc="/blazor-ui/documentation/assets/92205189ccd98ce83506bf206bddeeee/chat_dark_large.svg"
        description="Telerik UI for Blazor provides AI-powered development assistance through a unified MCP server that delivers intelligent, context-aware help directly in your IDE.">
    </article-card>
    <article-card
        href="/introduction#list-of-components"
        src="/blazor-ui/documentation/assets/34f07dcdfb06e61deacd0ae611ead0fe/editor_ai_integration_light_large.svg"
        title="Use Components"
        darkSrc="/blazor-ui/documentation/assets/5afbc2e3509e38a68fa2c0e148bc4e84/editor_ai_integration_dark_large.svg"
        description="Check the list of available Telerik Blazor components.">
    </article-card>
    <article-card
        href="https://demos.telerik.com/blazor-ui"
        src="/blazor-ui/documentation/assets/ef4e202163f8ba624ebe354cb8e2552b/grid_ai_chat_integration_light_large.svg"
        title="Browse Online Demos"
        darkSrc="/blazor-ui/documentation/assets/90e1c198dfd43aaf9faecb945f01dbe0/grid_ai_chat_integration_dark_large.svg"
        description="Explore the live Telerik UI for Blazor examples.">
    </article-card>
    <article-card
        href="/common-features/data-binding/overview"
        src="/blazor-ui/documentation/assets/97bf251c25d62741f119c17febd0aa5c/ai_column_assistant_light_large.svg"
        title="Learn Telerik Data Binding"
        darkSrc="/blazor-ui/documentation/assets/14d39c54f99f4a661e9ef641b95d3610/ai_column_assistant_dark_large.svg"
        description="Learn the data binding fundamentals for Telerik UI for Blazor components.">
    </article-card>
    <article-card
        href="/components/grid/overview"
        src="/blazor-ui/documentation/assets/72271b5c70f640266b01ed7c4b13d6a5/ai_data_highlight_light_large.svg"
        title="Get Started with Data Grid"
        darkSrc="/blazor-ui/documentation/assets/96fcc5790687fb5ebf46c7fde8006ff9/ai_data_highlight_dark_large.svg"
        description="Bind the Telerik Blazor Grid to data and choose from the large variety of built-in features.">
    </article-card>
    <article-card
        href="/styling-and-themes/overview"
        src="/blazor-ui/documentation/assets/16321f5a65c2a527641999ce3ccfa3a1/aiprompt_light_large.svg"
        title="Create Themes"
        darkSrc="/blazor-ui/documentation/assets/fd20d47973fa3004bcf03f1cc2bcbff3/aiprompt_dark_large.svg"
        description="Review the built-in themes, customize them, or create your own.">
    </article-card>
</article-card-container>

## See Also

* [Workflow Details for Telerik UI for Blazor](https://www.telerik.com/blazor-ui/documentation/getting-started/workflow-details)
* [Using Blazor Sections inside Telerik Components](https://www.telerik.com/blazor-ui/documentation/knowledge-base/common-net8-sections)
* [Getting Started Videos for Blazor](https://www.youtube.com/watch?v=aaRAZYaJ4xc\&list=PLvmaC-XMqeBYPTwcm478vs8Rujq2tiVJo)
