How to use css clases with tailwind css?

I am building a site with Next.js and tailwind and wanted to know if there is any way you can use tailwind CSS classes along with Nextjs classes. For example:

<img src={user.picture} className="rounded"{styles.pfp}></img>

or perhaps something like

<img src={user.picture} className=`rounded{styles.pfp}`></img>

Is there any way to do that? Do let me know if there is.

>Solution :

Yes, the way to do it would be like this.

<img src={user.picture} className={`rounded ${styles.pfp}`}></img>

with rounded being the tailwind class and styles.pfp being your class.

Leave a Reply