Getting Started
BlazorCompose lets you write Blazor UI as plain C#. This page is itself rendered
from Markdown, converted at build time and injected through Html.Raw.
Installation#
Add the runtime and the source generator to your project, then derive your
components from ComposeComponentBase.
A first component#
using Microsoft.AspNetCore.Components; using BlazorCompose; using static BlazorCompose.Html; [Route("/")] public partial class Home : ComposeComponentBase { protected override View Body => Div( H1("Hello"), Span("Welcome to BlazorCompose.")); }
Next steps#
- Read the counter sample to see events,
If, and keyedForEach. - Jump to Installation or A first component.
- Learn the element vocabulary and control flow.