Live Chat Icon For mobile
Live Chat Icon

How do I start building a new component for Blazor?

Platform: Blazor| Category: Components

Blazor considers each .razor file as a new component. The component class is usually written in the form of a Razor markup page. So, you can create a new component and reuse it across the application. In the following example, a Blazor component is created in the Components folder and used in the Index.razor page. 



    <div class="card card-body" style="width: 18rem;">

    @code {
        private string blazorHeader = "Blazor App!";
        private string pageName = "Blazor Page";
        private string pageDescription = "Blazor component is created";


@page "/"
@using BlazorApp1.Components


View Sample in GitHub

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.