chainlit
chainlit copied to clipboard
How to load Dark Mode by default?
I only need dark mode, how can i load dark mode by default?
As of now the first load is based on the system preference, then if the user changes the theme, the new preference is stored in the local storage.
As of now the first load is based on the system preference, then if the user changes the theme, the new preference is stored in the local storage.
can we have this as a parameter in config.toml?
@shawsa-artc You can easily do this using custom js file.
Add a custom.js file with the below content, under the public directory:
eval(console.log('Setting the default theme as dark.'));
eval(localStorage.setItem('themeVariant', 'dark'));
Now refer this file in config.toml as shown below:
custom_js = "/public/custom.js"
After doing this change when you restart the chainlit app, it will load the dark theme by default :-)