Theming
Use these tokens in any project.
Create a shadcn/ui project with Base UI
npx shadcn@latest init -b base -p novaReplace the theme variables
Copy the :root and .dark blocks from this site's global.css into your stylesheet, along with the extra @theme inline mappings:
@theme inline {
--font-sans: var(--font-geist-sans), system-ui, sans-serif;
--font-mono: var(--font-geist-mono), ui-monospace, monospace;
--font-display: var(--font-sans);
--font-heading: var(--font-sans);
--color-success: var(--success);
--color-warning: var(--warning);
--color-info: var(--info);
--color-border-strong: var(--border-strong);
}Load the font families
Install the bundled fonts so builds do not depend on a font CDN:
npm install geistimport { GeistSans } from "geist/font/sans"
import { GeistMono } from "geist/font/mono"
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en" className={`${GeistSans.variable} ${GeistMono.variable}`} suppressHydrationWarning>
<body>{children}</body>
</html>
)
}Apply the font roles in your stylesheet:
@layer base {
html { @apply font-sans; }
code, kbd, pre { @apply font-mono; }
}
.font-display {
font-family: var(--font-display);
font-weight: 500;
letter-spacing: -0.04em;
}Add components
Anything from Components, Blocks, or Charts now picks up the theme.
npx shadcn@latest add button card chart