@if (!Collapsed) {
@ChildContent
} @code { [Parameter] public RenderFragment ChildContent { get; set; } [Parameter] public bool Collapsed { get; set; } = true; //input params coming from from page [Parameter] public string LabelText { get; set; } void Toggle() { Collapsed = !Collapsed; } }