npx claudepluginhub thegpvc/gp-uiTheGP's @gp/ui design system library for React applications
Shared UI components for TheGP internal applications.
npm install @gp/ui
Add these lines to your app's main CSS file (e.g., src/index.css):
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');
@import "tailwindcss";
@import "@gp/ui/theme";
@source "../node_modules/@gp/ui/dist";
Why each line matters:
@import "tailwindcss" — Base Tailwind utilities (your app provides this)@import "@gp/ui/theme" — GP design tokens (colors, fonts, component classes)@source "..." — Tells Tailwind to scan our components so utility classes aren't purgedimport { Button, Badge, Card } from '@gp/ui'
function App() {
return (
<Card>
<Card.Header>Welcome</Card.Header>
<Card.Body>
<Button variant="primary">Get Started</Button>
</Card.Body>
</Card>
)
}
Ensure your vite.config.ts includes the TailwindCSS plugin:
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [react(), tailwindcss()],
})
Common icons are re-exported from lucide-react for convenience:
import { Search, User, Mail, Calendar, Loader2, TrendingUp } from '@gp/ui'
Note: Your app must have lucide-react installed as a peer dependency.
cn() - ClassName UtilityMerge Tailwind classes with proper precedence:
import { cn } from '@gp/ui'
<Button className={cn('extra-class', isActive && 'active-class')} />
To work on the design system components:
# Install dependencies
npm install
# Build the library
npm run build
# Watch mode for development (rebuilds on file changes)
npm run dev
The playground provides an interactive environment to view and test all components:
npm run playground
This starts a local dev server at http://localhost:5174 with hot reloading. To build the playground for deployment:
npm run build:playground
For production use, install via your package manager (see Installation above). For local development with a linked version:
In the gp-ui directory:
npm link
In your project directory:
npm link @gp/ui
To unlink:
# In your project
npm unlink @gp/ui
# In gp-ui (optional cleanup)
npm unlink
Recommended workflow:
npm run dev to watch for changesnpm link @gp/ui dependencyThis package requires the following peer dependencies to be installed in your app:
{
"react": ">=18.0.0",
"react-dom": ">=18.0.0",
"lucide-react": ">=0.400.0"
}
See DESIGN_GUIDE.md for:
This library includes a Claude Code plugin that provides AI assistance when building UIs with @gp/ui components.
In Claude Code, run:
/plugin add github:thegpvc/gp-ui
The plugin gives Claude knowledge of:
When building UIs, Claude will automatically use the correct components, variants, and patterns from @gp/ui.