@if (_isSelected) {

@Question

} else {

@Question

} @code { [Parameter] public string Answer { get; set; } = string.Empty; [Parameter] public EventCallback AnswerChanged { get; set; } [Parameter] public string Question { get; set; } = string.Empty; private bool _isSelected = false; private void SelectChanged() { Answer = _isSelected ? Question : string.Empty; _isSelected = !_isSelected; } }