Open Satyasn01 opened 1 day ago
@Satyasn01 I appreciate your interest in serene UI. But this library is a pure CSS and not a js/react library. I just used react to demo the HTML elements. I would like to do the dark mode theme in pure CSS only.
@Satyasn01 I appreciate your interest in serene UI. But this library is a pure CSS and not a js/react library. I just used react to demo the HTML elements. I would like to do the dark mode theme in pure CSS only.
Instead of dynamically changing themes via JS, we can expand the current CSS custom properties to include multiple preset themes. This can be achieved by defining a set of themes as classes that can be applied to the root or any other container element to change themes on the fly with just a class change.
Description
I propose adding a Dynamic Theming API to Serene UI, which would allow developers to customize and switch themes at runtime programmatically. This feature aims to extend the existing customization capabilities, which currently rely on statically defined CSS variables.
Proposed API and Usage
The Dynamic Theming API would provide a JavaScript utility to manipulate the root CSS variables directly from the application's logic. This would be particularly useful for applications needing to switch themes based on user preferences or environmental conditions.
Example API Usage:
Benefits
Potential Impact
Implementing this feature would make Serene UI a more attractive option for developers building complex applications that require theme personalization and could significantly improve user engagement by supporting multiple themes.