I am just beginning to learn Blazor, and my google-fu seems to be failing me here. From what I understand, Blazor includes certain components by default (EditForm
for instance). I would like to know which components are available to me.
The problem is, when I google blazor components
I end up with a whole slew of third party component packages, some free and some free until you actually want to use them.
Where would I find a canonical list of the components that are available in a standard Blazor installation so that I can learn them before I decide to bring in any third party dependencies into my project?
Blazor apps are built using Razor components, informally known as Blazor components. A component is a self-contained portion of user interface (UI) with processing logic to enable dynamic behavior. Components can be nested, reused, shared among projects, and used in MVC and Razor Pages apps.
Use the ref attribute for a component and define it filed with the same name and same type of component. While the Counter component is rendered, the field counter is populated along with the component instance. For more information, refer to the link capture-references-to-components.
To add a component to the project, right-click on the Pages folder and choose Add -> Razor Component. Refer to the following image. In the Add New Item- Blazor App dialog, provide the name EmployeeCard and click Add.
Those components come form Microsoft.AspNetCore.Components, which are imported in _Imports.razor
:
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
You can find a list at:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.forms?view=aspnetcore-3.1
and
https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.routing?view=aspnetcore-3.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With