In our NextJs app, we are utilizing Tailwind CSS and encountering difficulties when trying to use the backgroundImage property
with a JavaScript variable. This is leading us to use an approach that goes against standard coding practices:
className={clsx("absolute top-0 right-0 left-0 bottom-0 bg-100% md:hidden")}
style={{ backgroundImage: `url(${customBgImageMobile})` }} //we prefer not to use style in this manner
We aim to avoid using the style attribute
here and instead utilize the backgroundImage property from Tailwind CSS classes.
Your assistance on this matter would be greatly valued. Thank you!