ui
ui copied to clipboard
Add Font instructions when adding to an existing project
See #68
@niclas-j is attempting to deploy a commit to the shadcn-pro Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
next-template | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Feb 8, 2023 at 5:25PM (UTC) |
ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Feb 8, 2023 at 5:25PM (UTC) |
As of Next.js 13.2, @next/font has been integrated into the core next
package (see here), so no need to install an extra package.
Also, it would be nice to also provide instructions for non-Next usage!
You can do it purely in globals.scss
as so:
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--font-sans: "Inter";
}
@niclas-j Thanks for looking into this. I created an updated PR with docs for adding fonts. https://github.com/shadcn-ui/ui/pull/1752
Marking this one as done. Feel free to reopen if not.
Thank you.