Playground
0.2.0-preview.61
HomePage.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using eQuantic.UI.Primitives;
[Page("/")]
public sealed class HomePage : StatefulComponent
{
private int _count;
public override VisualNode Build(ComponentContext context)
{
var theme = context.Theme;
var card = Card(Column(gap: Space.S4, children: [
Text("Sessions today", TypeRole.Overline, theme.TextMuted),
Text($"{_count}", TypeRole.Display, theme.TextPrimary),
Divider(),
Row(gap: Space.S3, children: [
Button("Count", onPressed: () => SetState(() => _count++)),
Button("Reset", Variant.Outline, onPressed: () => SetState(() => _count = 0)),
]),
]));
return Box(new BoxStyle
{
Width = SizeValue.Fill,
Height = SizeValue.Fill,
Background = theme.SurfaceSubtle,
Padding = EdgeInsets.All(Space.S6),
}, card.Centered());
}
}
C# 12 · .NET 10Ln 1, Col 1
0 errors · 0 warnings
ui.equantic.tech/preview
Press Run to compile and mount this component.
Build outputnot run yet
$eqc build HomePage.cs
ready
target: web · SSR + hydrationeQuantic.UI 0.2.0-preview.61