Skip to content

Zikojs | Hooks | useRoot

useRoot is a utility hook that maps a JavaScript object to CSS custom properties (:root variables) and exposes them as reusable style references.

It allows you to define global design tokens (colors, spacing, borders, etc.) and switch them dynamically at runtime.