Command Palette

Search for a command to run...
HQ UI

Remix

Ready to remix your project with some dark mode flair? Dive into this guide and get your app grooving in the dark.

Remix Themes

Remix themes is a slick way to handle themes in your Remix app. Read more about it here.

npm i remix-themes

Session Storage

And next, in your app/sessions.server.tsx file, add the following:

Providers

Next to add the ThemeProvider to your root layout like so:

export { Theme, useTheme } from 'remix-themes'

Action Route

Create a file in /routes/action.set-theme.ts. Make sure you pass the filename to the ThemeProvider component. This route stores the preferred theme in session storage when the user switches it up.

import { themeSessionResolver } from '@/sessions.server'
import { createThemeAction } from 'remix-themes'

export const action = createThemeAction(themeSessionResolver)

Theme Switcher

For theme switcher, you can use the useTheme hook from remix-themes to get the current theme.

npm i @tabler/icons-react

Then, make sure you import the icons you want to use.