---
title: "Discussion on \"Add a class in Nunjucks using a conditional statement\" | Hashnode"
description: "Discussion on \"Add a class in Nunjucks using a conditional statement\". In Nunjucks we can use a conditional statement in two ways:\n\nexplicit using the {% if %} keyword,\nor implicit using the {{ }} expression.\n\nNote: I did not find any reference about these names – implicit/explicit – in the Nunjucks official documentati..."
url: "https://hashnode.com/posts/add-a-class-in-nunjucks-using-a-conditional-statement/601906040394d00f62dc3c02"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Add a class in Nunjucks using a conditional statement](https://giuliachiola.hashnode.dev/add-a-class-in-nunjucks-using-a-conditional-statement?utm_source=hashnode&utm_medium=feed)

In Nunjucks we can use a conditional statement in two ways: explicit using the {% if %} keyword, or implicit using the {{ }} expression. Note: I did not find any reference about these names – implicit/explicit – in the Nunjucks official documentati...

Feb 2, 2021 · 3 min read · giuliachiola.hashnode.dev  
Read the article

## Written by

[Giulia Chiola](https://hashnode.com/@giuliachiola)

@giuliachiola · Val di Susa, Italia

  
[View profile](https://hashnode.com/@giuliachiola)

Front-end Developer. 👾 Media engineer. ⚡ Facing life one bug at a time. 🔥 Easily bribed with chocolate. 🍫 she/her

Front-end Developer. 👾 Media engineer. ⚡ Facing life one bug at a time. 🔥 Easily bribed with chocolate. 🍫 she/her - #BLM

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
