DOM attributes are rendered based on .NET parameters. If the parameter value is true, the attribute is rendered minimized, otherwise it’s not. Refer to the code example to render the checked attribute conditionally.
<input type="checkbox" checked="@IsChecked">
@code {
[Parameter]
public bool IsChecked { get; set; }
}
Share with