Shadcn fonts not working
Hi! So I'm using shadcn for as my component library. I'm using the Dialog component together with nextjs but using nextjs fonts does not apply to other components of shadcn, especially in my dialog content. Do you guys know how I might be able to fix this? Thank you!
3 Replies
Could you share the code of the component?
shadcn Dialogs are rendering in a React portal outside of the root _app component. use next/font in your head to solve this: https://nextjs.org/docs/pages/building-your-application/optimizing/fonts#apply-the-font-in-head
Optimizing: Fonts
Optimize your application's web fonts with the built-in
next/font
loaders.Thanks man! putting it in the head worked for me!