---
title: &num;class Directive (Fudgel.js)
---

# `#class` Directive

There's a [directive](directives.html) that makes it much easier to add and remove classes dynamically. The `#class` directive allows you to define class names to add or remove if the associated value is truthy or falsy. It accepts an object where the property names are the class names and the property values are the conditions.

<code-sample sample="samples/directive-class.js"></code-sample>
