Explain RenderFragment and RenderFragment<T>. How do you create a templated component?

Last updated 5 July 2026

  • RenderFragment is a delegate representing a chunk of UI with no input. Default child content is a RenderFragment named ChildContent.

  • RenderFragment<T> takes a value of type T and returns markup, exposing it to the caller as @context (or a named Context).

  • For a templated component, declare @typeparam and [Parameter] fragments, then invoke the template per data item, passing the item as context.

  • https://learn.microsoft.com/en-us/aspnet/core/blazor/components/templated-components?view=aspnetcore-10.0
  • https://www.telerik.com/blogs/blazor-basics-templating-components-renderfragments
  • https://medium.com/dotnet-new/advanced-blazor-component-techniques-for-clean-scalable-ui-development-7e8f03dd3e89
  • https://blazor-university.com/templating-components-with-renderfragements/
  • https://www.telerik.com/blogs/blazor-components-definitive-guide
  • https://blazor-university.com/templating-components-with-renderfragements/passing-placeholders-to-renderfragments/
All Blazor interview questions