Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Svelte Tutorial for Beginners - Style your Svelte component [2/3] - class: Directive

Автор: lihautan

Загружено: 2021-04-05

Просмотров: 1702

Описание:

We are going to learn how to conditionally style elements in Svelte component.

-- We can pass a JavaScript expression to the class attribute. If we pass a dynamic string variable, every time the string value changes, we can apply a different class to the element. So, what's more to learn?

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

---

💻 REPL https://svelte.dev/repl/19cce00af5ba4...

🎧 Svelte Tutorial for Beginners    • Svelte Tutorial for Beginners  

📚 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:   / lihautan  
Blog: https://lihautan.com/
Newsletter: https://lihautan.com/newsletter

#svelte #sveltetutorial #sveltebeginner

Thanks for watching 🥰 -- with love, Li Hau

Svelte Tutorial for Beginners - Style your Svelte component [2/3] - class: Directive

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

array(0) { }

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]