I want to use _metronic for my NextJS app with a ReactJS template. I only moved the _metronic folder, and after doing so, I wanted to use the badge-light component. However, I encountered the following issues:
--bs-success-light is not defined
When I switch back to the original React setup, it works properly. However, when I use Next.js, the issue persists. Interestingly, when I use the default badge, everything works fine.
pretty sure I already import all the needed scss files like this
import '../src/_metronic/assets/sass/style.scss' import '../src/_metronic/assets/sass/plugins.scss' import '../src/_metronic/assets/sass/style.react.scss'
import '../src/_metronic/assets/fonticon/fonticon.css' import '../src/_metronic/assets/keenicons/duotone/style.css' import '../src/_metronic/assets/keenicons/outline/style.css' import '../src/_metronic/assets/keenicons/solid/style.css'
Hi,
We haven't tried combining our React version with NextJs, we will check it and consider using NextJs in future releases if we will see demand.
If you have loaded all of the styles and installed Bootstrap dependency then Bootstrap variable should be defined. However, please note that our React version is a client SPA application then NextJs is a server-side rendered application that renders differently and it might require you to load styles differently.
To connect Bootsrap to NextJs you can refer to this post.
Regards,
Lauris Stepanovs,
Keenthemes Support Team