Demos/CounterUI.cs
using Goo;
using Sandbox.UI;

namespace Sandbox;

public class CounterUI : GooPanel<Container>
{
	private int _count;

	protected override Container Build() => new Container
	{
		Padding = 16,
		Width = 128,
		Height = 128,
		BackgroundColor = Color.White,
		BorderRadius = 12,
		FlexDirection = FlexDirection.Row,
		Gap = 12,
		AlignItems = Align.Center,
		Children =
		{
			new Text(_count.ToString()),
			new Container
			{
				Padding = 8,
				BackgroundColor = Color.Orange,
				HoverBackgroundColor = Color.Cyan,
				BorderRadius = 6,
				OnClick = e => { _count++; Rebuild(); },
				Children = { new Text("+") },
			},
		},
	};
}