Next.js Discord

Discord Forum

Use another font NextJS/TailwindCSS

Unanswered
Great Skua posted this in #help-forum
Open in Discord
Great SkuaOP
Hello,
I want to apply ["Arial", "Helvetica", "sans-serif"] to just one page in my project. how do I do that?

1 Reply

there is a page in the documentation that explains how to use next/font with tailwind: https://nextjs.org/docs/app/building-your-application/optimizing/fonts#with-tailwind-css
once you have the class name configured you can use it anywhere you want, e.g. <div className="font-foo">