I've just recently picked up React and Tailwind for a project, and I am still very much a beginner. I wanted to make an element have a background image as a custom class variable, something like this:
<div className="bg-[url(`https://example.com/${variable}.png`)]"></div>
But as Tailwind purges classes, would this somehow be possible? I hope I'm not missing anything, but it doesn't seem doable to me right now
https://example.com/${variable}.png)]"className="bg-[url('https://example.com/${variable}.png')]"bg-[url('https://example.com/${variable}.png')]class on that element<div style={`background: url(https://example.com/${variable}.png`}>instead