v0.14.134 - 35.7 / 31.6

class:__

There are a variety of ways to set CSS Classes. To remove a class set it to undefined, null orfalse

# List

On where the className could be changed for a reactive value

class="className"
class="className1 className2"
class={{ className: falsy/truthy }}
class:className={falsy/truthy}
class:my-ns={{ className: falsy/truthy }}

# Note

  • When passing an object with the classNames as keys, it wont handle the removal of classes not present in the object. To remove a class set the value to falsy

# CSS classes

The different ways to set CSS classes