Next.js Discord

Discord Forum

bug trying apply bg color class apply dynamically

Unanswered
Gharial posted this in #help-forum
Open in Discord
GharialOP
hello guys I need help if anyone know what the bug in my code I am developing a time-tracking dashboard i want to apply tailwind classes dynamically in my card but when I use the map method to render the card only the first card color shows and the rest card color property not applied i attached 4 file

1 Reply

Your classes need to be compiled statically. Tailwind doesn't support dynamic class names.

Also, instead of dumping here all your files provide only the relevant code so we don't have to download anything and read through potentially hundreds of lines of code.