I'm trying to implement a light vs dark mode toggle for my Next app. I'm using the radix ui component library for my styling. I'm a little stuck trying to figure out the logic to make this happen. How can I add this functionality to my Navbar if I have to declare the theme inside of my layout.tsx file?
layout.tsx: layout
NavBar.tsx: navbar
Step 1: Install next-themes
Step 2: Create a theme provider
Step 3: Wrap your root layout
Step 4: Add a mode toggle