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 Next.js 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.
CodePudding user response:
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.