Create a theme provider
Wrap your root layout
Add the ThemeProvider
to your root layout.
Add a mode toggle
Example 2 using Toggle Group
in this example, we will use a Toggle Group
component to toggle between light, dark mode. also, we can change scale
of this for smaller view.
Place a mode toggle on your site to toggle between light and dark mode.