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
Liam
Liam2y ago
Could you share the code of the component?
Filip
Filip2y ago
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.
josh-dev627
josh-dev6272y ago
Thanks man! putting it in the head worked for me!
Want results from more Discord servers?
Add your server