Class and Style Bindings | Vue.js thumbnail
Class and Style Bindings | Vue.js
vuejs.org
which element will receive this class. A common need for data binding is manipulating an element's class list and inline styles. Since class and style are both attributes, we can use v-bind to assign them a string value dynamically, The above syntax means the presence of the active class will be det
6 Users
0 Comments
31 Highlights
1 Notes

Top Highlights

  • which element will receive this class.
  • A common need for data binding is manipulating an element's class list and inline styles. Since class and style are both attributes, we can use v-bind to assign them a string value dynamically,
  • The above syntax means the presence of the active class will be determined by the truthiness of the data property isActive.
  • We can also bind to a computed property that returns an object. This is a common and powerful pattern:
  • add the appropriate prefix

Tags

Vue

Domain

Ready to highlight and find good content?

Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.