builder.OpenComponent(0); builder.CloseComponent();
if (isMyComponentVisible) { builder.OpenComponentIn this example, the `CloseComponent` method is used to finish rendering the `MyComponent` component only if it is visible. The `AddAttribute` method is used to set the value of the `Title` parameter for the component. Package library: Microsoft.AspNetCore.Blazor.(0); builder.AddAttribute(1, "Title", "My Component"); builder.CloseComponent(); }