---
title: Condition :if
weight: 4
---

`:if` directive allows to conditionally display a tag and its descendants.

## Example

```html
<p :if="state.count < 5">Less than 5</p>
<!-- Will be displayed if the condition is met -->
```
