How to define context in a template component in Blazor?

A parameter can be accessed by the template component (of type RenderFragment<T>) using the context property. The context parameter is the implicit parameter; however, the parameter can be changed using the Context attribute on the templated component. Alternatively, this attribute can be specified on the component element. So, this attribute applies to all specified template parameters. Reference link: https://docs.microsoft.com/en-us/aspnet/core/blazor/templated-components?view=aspnetcore-3.1

Issue—System.InvalidOperationException: Object of type ‘Microsoft.AspNetCore.Components.Forms.InputText’ does not have a property matching the name ‘type’.

As of now, there is no support for including arbitrary attribute support for the built-in input component <InputText />. You have to remove the type attribute to resolve this issue. There is a plan for including the type=”password” attribute for the <InputText> component, which can be tracked in this GitHub thread. [Issue Resolved]