TwThemes
The TwThemes
object (returned from initTwThemes()
)
fuses the relationship between the Schema
and
Themes
, and promotes the following API:
TwThemes API:
- change the active theme at run-time:
- miscellaneous API in support of the app's theme selection UI control:
- auto configure the tailwind context colors in
tailwind.config.js
(part of the build process):
NOTE: These tw-themes methods are in reality functions (not methods). In other words, they can be used without dereferencing the object at run-time. The object wrapper (in this case) is simply a delivery mechanism.
NOTE: For additional considerations regarding the TwThemes
object,
please refer to the discussions on App State and TwThemes Reactivity.