~/talk

Dynamic CSS classes with Vue 3

Talkat CityJS Conference São Paulo 2022 · 2022-04-28..04-30· [vue, css]
links:none on file
slides:none on file

Explains how Vue 3.2 lets component state drive CSS by using v-bind in stylesheet to expose data as CSS variables, with live demo code that binds a highlight color to a data property and toggles classes via array and object class bindings. Shows common uses — dark/light themes, sold‑out/item status, component variations — and notes compatibility with the Composition API and setup syntax, arguing this reduces reliance on styled‑component libraries while keeping runtime performance.

AI-written summary · about

  1. 0:00Introduction to dynamic CSS
  2. 2:05Static vs dynamic classes
  3. 5:22Demo with dynamic classes
  4. 8:45State-driven CSS variables
  5. 12:07Conclusion and use cases
  6. 14:17Q&A and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.