@if (visible) { } @code { bool visible = false; string text = "test"; void OnMouseDown() { text = "test" + visible; visible = !visible; } }