We are going to learn how to conditionally style elements in Svelte component.
Yes, and in this video, we are going to explore another trick, that is more readable and concise than manipulating strings in the class attribute.
Introduction 00:00 Various ways to conditionally add class to elements 00:12 The class: directive 02:35 Shorthand for class: directive 04:30
Related Resources Svelte https://svelte.dev Svelte REPL https://svelte.dev/repl Svelte Tutorial - Classes https://svelte.dev/tutorial/classes
🥰 Support me https://www.buymeacoffee.com/lihautan
Want to learn more from me? Check out these links:
Twitter: https://twitter.com/lihautan Blog: https://lihautan.com/ Newsletter: https://lihautan.com/newsletter
Thanks for watching 🥰 -- with love, Li Hau