UNPKG
@polight/lego
Version:
beta (2.0.0-beta.8)
latest (1.11.0)
2.0.0-beta.9
2.0.0-beta.8
2.0.0-beta.7
2.0.0-beta.5
2.0.0-beta.4
2.0.0-beta.3
2.0.0-beta.2
2.0.0-beta.1
1.11.0
1.10.1
1.10.0
1.9.2
1.9.1
1.9.0
1.8.5
1.8.4
1.8.3
1.8.2
1.8.1
1.8.0
1.7.2
1.7.1
1.7.0
1.6.7
1.6.6
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.4.1
1.4.0
1.3.3
1.3.2
1.3.0
1.2.1
1.2.0
1.1.1
1.1.0
1.0.4
1.0.3
1.0.1
1.0.0
0.11.1
0.11.0
0.10.0
0.9.2
0.9.1
0.9.0
0.8.0
0.7.6
0.7.5
0.7.4
0.7.3
0.7.2
0.7.0
0.6.0
0.5.0
0.4.2
0.3.2
0.3.1
0.3.0
Tiny Web-Components lib for future-proof HTML mentors
github.com/Polight/lego
Polight/lego
@polight/lego
/
docs
/
content
/
v1
/
usage
/
if.md
9 lines
(6 loc)
•
219 B
Markdown
View Raw
1
2
3
4
5
6
7
8
9
---
title:
Condition
:if
weight:
2
---
`:if`
directive
allows
to
conditionally
display
a
tag
and
its
descendants.
Example:
`<p
:if="state.count
<
5
">Less than 5</p>` will be displayed if the condition is met.