LumexUI provides a flexible, CSS-first theming system that lets you customize component styling through global CSS variables. These variables can be overridden globally or scoped to specific themes using selectors such as classes or data attributes.
Global theme
To override the default design tokens globally, define your CSS variables inside the :root
selector.
These values will apply to the entire application.
CSS variables inside the :root
selector represent the light theme.
Custom themes
Custom themes can be defined using CSS selectors such as classes or data attributes. Components within elements that match these selectors will automatically use the overridden variables.
As an example, a custom theme named orange can be created by defining these CSS variables:
Applying a theme at runtime can be done by toggling the class on a wrapper element like <html>
or <body>
.