Quick Start
Only 2 steps to create automation component
Installation
Install from nuget
Add service in Program.cs
Start
Inherits
BlazorComponentBase
instead of ComponentBaseFor .razor file component must add
@attributes="AdditionalAttributes"
attribute for automation features with specified HTML elementDefine
CssClassAttribute
for component or parameters
Example for .razor
file
.razor
fileCreate
Element.razor
file
Execution in razor
In Element.cs
class
Element.cs
classCreate
Element
class
Execution in razor
As you can see, using component classes can fully automate components, but the downside is that it requires a certain amount of concrete thinking, especially when dealing with complex components. Of course you can mix the two, but as long as it increases efficiency, it's a good idea.
Last updated