Theme switcher
Global website theme
The theme switcher is a component allowing you to change the global theme of your website easily.
By default, Axentix handles the dark theme.
Three themes are already working :
- Light
- Dark
- System (automatically choosing between dark and light depending on the system preferences)
Theme enabling
To enable the theme component, use the enable
method.
Theme switching
To handle theme switching, use the Theme
class.
Mixins
Use the theme mixin to set css depending on the actual theme.
Methods
Method | Description |
---|---|
Axentix.Theme.toggle('dark') | Toggles the theme with the name as parameter. |
Axentix.Theme.enable() | Enable the theme handling component. |
Axentix.Theme.disable() | Disable the theme handling component. |
Events
Event | Description |
---|---|
ax.theme.change | Event sent when the theme has been changed. |
Sponsors
Become a sponsor