Playground
Exemplo
Contador
PT
ui.equantic.tech
Web
Photon
Executar
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 10
Ln 1, Col 1
0 erros · 0 avisos
Preview
JS gerado
ui.equantic.tech/preview
Clique em Executar para compilar e montar este componente.
Saída do build
ainda não executado
$
eqc build HomePage.cs
pronto
target: web · SSR + hidratação
eQuantic.UI 0.2.0-preview.61