Next.js Discord

Discord Forum

The theme-color meta tag does not change according to the current theme (dark, light)

Unanswered
Yves posted this in #help-forum
Open in Discord
Avatar
The theme-color does not change when changing the current theme, even if I configure the app according to the nextjs documentation: https://nextjs.org/docs/app/api-reference/functions/generate-viewport#themecolor
It works the same, I'm using nextjs, tailwind and shadcn-ui.

Below is the layout.tsx file, which is where I load all the meta tags, and the template.tsx file, which is where I load the theme settings.
Image
Image

2 Replies

Avatar
template.tsx
Image
layout.tsx
Image