Dark mode
Add dark theme to your application.
Enable dark mode
All you need to do is add as a hostDirectives in your app.component.ts.
The configuration needed for tailwind will depend on the type value of . In , you are able to change its behavior. Here is an example of configuration to make it use data-attributes :
provideFlowbiteThemeConfig ({
type: { type: 'attr', name: 'data-theme' },
}),@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));Get or set theme manually
In order to access or to update the application theme manually, you simply have to inject into your component and call one of the provided functions.