Modern frontend frameworks treat components as JavaScript objects, classes, or functions.

But what if you could build components using only HTML, CSS, and attributes — no JS logic, no virtual DOM, no build step?

That’s exactly what State.js enables.

State.js exposes HTML attributes as reactive CSS variables, letting you build fully reactive UI components using nothing but CSS.

In this article, you’ll learn how to build your first CSS‑reactive component using State.js.