Classes can be conditionally rendered with a class:<class>=
notation.
Svelte by Example: Class & Style Directives
Svelte supports class:
and style:
directives to make dynamic styling easy.
In this example, we'll demonstrate class and style directives by enabling a large
prop on our HelloWorld
.
Styles can also be set with a style:<property>=
notation.
resources://
Further reading on this topic.