Defines the theme and color scheme for the app.
The supported color schemes are:
- blue
- gray
- green
- neutral
- orange
- red
- rose
- slate
- stone
- violet
- yellow
- zinc
Usage
You can override specific properties of the selected theme/color scheme:
ShadColorScheme.fromName
If you want to allow the user to change the default shadcn themes, I suggest using ShadColorScheme.fromName
.
In this way you can easily create a select to change the color scheme, for example:
For example I’m using solidart as state management, here it is the example code used to rebuild the app widget when the user changes the theme mode.
https://docs.page/nank1ro/solidart/examples/toggle-theme
The same can be done for the color scheme, using a Signal<String>()