Installation
How to install dependencies and structure your app to use the Country Club UI Kit, with framework-specific setup for Next.js and Vite.
1. Install the package
Inside this monorepo, add the workspace package to your app. For external apps, publish @countryclub/ui-react to your registry first.
pnpm add @countryclub/ui-react@workspace:* react@^19 react-dom@^192. Set up Tailwind CSS v4
The kit is styled with Tailwind CSS v4. Install Tailwind and wire it into your bundler — the plugin differs between Next.js and Vite.
3. Import the design system
In your global stylesheet, import Tailwind, the kit's design system, and point Tailwind at the kit's source so its utility classes are generated:
/* app/globals.css */
@import "tailwindcss";
@import "@countryclub/ui-react/styles.css";
/* Generate utilities used inside the kit's components */
@source "../node_modules/@countryclub/ui-react/src";The design system uses the DM Sans (sans) and Fraunces (serif) typefaces. Load them however your framework prefers, then override the font variables:
4. Add the ThemeProvider
Dark mode is driven by a data-theme attribute on <html>. Wrap your app with the kit's ThemeProvider (adapted from next-themes — it works in any React app):
import { ThemeProvider } from "@countryclub/ui-react";
export default function RootLayout({ children }) {
return (
<html lang="en" suppressHydrationWarning>
<body>
<ThemeProvider
attribute="data-theme"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
</ThemeProvider>
</body>
</html>
);
}5. Use components
That's it — import any component and start building:
import { Button } from "@countryclub/ui-react";
export function Example() {
return <Button variant="outline">Book a tee time</Button>;
}The TanStack Form bindings live in a separate entry point so the dependency stays out of your bundle unless you use it:
import { useAppForm } from "@countryclub/ui-react/form";