bootsaas logo

Theme Provider

ThemeProvider is exactly what you think it is. It allows you to control the color scheme of the application.

Usage is as simple as:

<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange > {children} </ThemeProvider>

This would usually be used once per application / in root layout.

Now you can simply put a theme switch <ModeToggle /> to your navbar for example, and you have a working theme switch.

bootsaas logoCopyright © 2024 - All rights reserved