'The requirement is that the checkbox should be visible when hovered over, but when not hovered over, the checkbox should be checked and invisible. The issue I am facing is that the checkbox disappears when checked and not hovered over.'
.custom-nav-link .mud-checkbox {
display: none;
position: absolute;
top: 0;
left: 130px;
}
.custom-nav-link:hover .mud-checkbox {
display: inline-block;
}
.mud-checkbox:checked {
display: inline-block;
}
<div class="d-flex align-items-center custom-nav-link">
<MudNavLink Href="/dashboard" IconColor="Color.Secondary" Icon="@Icons.Material.Filled.Dashboard">My Dashboard </MudNavLink>
<MudCheckBox @bind-Checked="@isdashboardChecked" class="mud-checkbox" Color="Color.Primary" CheckedIcon="@Icons.Material.Filled.Star" UncheckedIcon="@Icons.Material.Filled.StarOutline" Size="Size.Small"></MudCheckBox>
</div>