TheGP's @thegpvc/ui design system library for React applications

Install

/plugin install gp-ui@gp-ui

Run it inside Claude Code after adding the marketplace with /plugin marketplace add thegpvc/gp-ui.

Contents

Discovered from source

Skills 1

@thegpvc/ui Design System

TheGP's shared React component library with Tailwind theme integration.

Quick Reference

Import: import { Button, Card, Layout } from '@thegpvc/ui' Theme: @import "@thegpvc/ui/theme"; in CSS Icons: import { SearchIcon, UserIcon } from '@thegpvc/ui'

Available Components

ComponentPurpose
ButtonPrimary actions with variants: primary, secondary, ghost, destructive
BadgeStatus indicators: success, warning, error, info, neutral
CardContainer with Card.Header, Card.Body, Card.Footer
StatCardMetric display with optional trend indicator
StatGridKey-value grid with formatting and copy support
AlertNotifications: info, warning, error, success
InputText input with label, icons, validation states
TextAreaMulti-line input with auto-resize
ModalDialog overlays (Radix-based) with sizes, controlled/uncontrolled state
DropdownMenu system (Radix-based) with items, checkboxes, submenus
TooltipHover hints (Radix-based)
TabBarHorizontal tab navigation
LayoutApp shell with header, sidebar, user menu
SidebarCollapsible navigation with responsive behavior
SkeletonLoading placeholders
LoginPageFull-screen login with branding
GPLogoTheGP logo SVG

Resources

Load these as needed:

Key Patterns

Class Merging

Always use cn() for combining classes:

import { cn } from '@thegpvc/ui'
<div className={cn('base-class', condition && 'conditional-class', className)} />

Compound Components

Card, Dropdown, Tooltip use dot notation:

<Card>
  <Card.Header>Title</Card.Header>
  <Card.Body>Content</Card.Body>
</Card>

Semantic Icons

Icons named by purpose, not appearance:

import { BackIcon, SpinnerIcon, DeleteIcon } from '@thegpvc/ui'

Theme Tokens

Custom Tailwind colors available after importing theme:

  • orange-50 to orange-900 (brand orange)
  • navy-50 to navy-950 (dark navy)
  • cream (off-white background)

Peer Dependencies

Apps must install: react, react-dom, lucide-react, @radix-ui/react-dialog, @radix-ui/react-dropdown-menu, @radix-ui/react-tooltip, @radix-ui/react-label

Commands 3

You are building a new UI feature or component using TheGP's @thegpvc/ui design system.

Your Task

Build the requested feature using @thegpvc/ui components, following TheGP's design patterns and best practices.

Guidelines

Component Selection

  • Use @thegpvc/ui components exclusively - never create custom UI components
  • Choose appropriate variants: primary, secondary, ghost, destructive for buttons
  • Use compound components: Card.Header, Card.Body, Modal.Content, Dropdown.Item
  • Leverage Layout, Sidebar, and LayoutContainer for page structure

Styling & Theme

  • Use @thegpvc/ui theme tokens: orange-500, navy-900, cream, etc.
  • Apply spacing: gap-4, p-6, space-y-2 following 4px/8px grid
  • Use semantic icon names: SearchIcon, UserIcon, DeleteIcon
  • Maintain mobile-first responsive design

Best Practices

  • Keep components simple - use composition over configuration
  • Pass minimal props - leverage sensible defaults
  • Use cn() utility for conditional className merging
  • Ensure keyboard navigation and WCAG 2.1 AA compliance
  • Follow existing patterns in the @thegpvc/ui library

Common Patterns

Forms:

<Input label="Email" type="email" />
<TextArea label="Description" autoResize />

Actions:

<Button variant="primary">Save</Button>
<Button variant="secondary">Cancel</Button>

Containers:

<Card>
  <Card.Header>
    <h2>Title</h2>
    <Badge variant="success">Active</Badge>
  </Card.Header>
  <Card.Body>Content</Card.Body>
  <Card.Footer>Actions</Card.Footer>
</Card>

Dialogs:

<Modal>
  <Modal.Trigger asChild>
    <Button>Open</Button>
  </Modal.Trigger>
  <Modal.Content>
    <Modal.Header>
      <Modal.Title>Title</Modal.Title>
    </Modal.Header>
    <Modal.Body>Content</Modal.Body>
    <Modal.Footer>
      <Button>Confirm</Button>
    </Modal.Footer>
  </Modal.Content>
</Modal>

Resources Available

Load the gp-ui skill for complete component APIs, design tokens, icons, and implementation examples.

You are helping migrate an existing React application to use TheGP's @thegpvc/ui design system.

Your Task

  1. Audit Current UI: Analyze the existing codebase to identify:

    • Custom button, card, input, modal, dropdown, and other UI components
    • Inline Tailwind styling that could use @thegpvc/ui components
    • Color values that should use @thegpvc/ui theme tokens
    • Custom icons that could be replaced with @thegpvc/ui icon exports
  2. Create Migration Plan: Generate a detailed plan that includes:

    • Which components to migrate first (prioritize commonly used components)
    • Mapping of current components to @thegpvc/ui equivalents
    • Required peer dependencies to install
    • Tailwind v4 integration steps
    • Theme token replacements (colors, spacing, typography)
    • Breaking changes and compatibility concerns
  3. Implementation Strategy:

    • Start with setup (install dependencies, configure Tailwind v4)
    • Migrate one component type at a time
    • Update imports and component usage
    • Replace custom styling with @thegpvc/ui variants and props
    • Test after each migration step
  4. Generate Migration Checklist: Create a task list using TodoWrite to track:

    • Setup and configuration
    • Each component type to migrate
    • Testing and verification steps

Key Considerations

  • Maintain existing functionality during migration
  • Use @thegpvc/ui variants (primary, secondary, ghost, etc.) instead of custom styles
  • Replace hard-coded colors with theme tokens (orange-500, navy-900, etc.)
  • Leverage compound components (Card.Header, Dropdown.Item, etc.)
  • Ensure accessibility is maintained or improved

Resources Available

Load the gp-ui skill for detailed component APIs, setup instructions, and migration examples.

You are reviewing code to ensure it follows @thegpvc/ui design system patterns and TheGP's style guide, especially for custom code not covered by the component library.

Your Task

Perform a comprehensive design system compliance review of the code and provide actionable feedback.

What to Review

1. Component Usage

  • ✅ Are @thegpvc/ui components used where applicable?
  • ✅ Are component variants used correctly (primary, secondary, ghost, destructive)?
  • ✅ Are compound components used properly (Card.Header, Modal.Content, etc.)?
  • ❌ Flag any custom UI components that duplicate @thegpvc/ui functionality

2. Theme Tokens & Colors

  • ✅ Colors use theme tokens: orange-500, navy-900, cream, gray-*
  • ❌ Flag hard-coded hex colors, rgb values, or non-theme colors
  • ✅ Verify semantic color usage (orange for primary, navy for text, etc.)
  • ❌ Flag use of arbitrary values like bg-[#ff5500]

3. Spacing & Layout

  • ✅ Spacing follows 4px/8px grid: gap-4, p-6, space-y-2, mb-8
  • ❌ Flag arbitrary spacing like mt-[13px] or gap-[22px]
  • ✅ Container widths use design system: max-w-xl, max-w-4xl, max-w-7xl
  • ✅ Proper use of LayoutContainer for consistent page margins

4. Typography

  • ✅ Text sizes use scale: text-xs, text-sm, text-base, text-lg, text-xl, etc.
  • ✅ Font weights: font-medium (500), font-semibold (600), font-bold (700)
  • ✅ Headings use navy: text-navy-900, text-navy-800
  • ✅ Body text uses gray: text-gray-600, text-gray-700
  • ❌ Flag hard-coded font sizes or weights

5. Icons

  • ✅ Icons imported from @thegpvc/ui: import { SearchIcon, UserIcon } from '@thegpvc/ui'
  • ✅ Icon sizing: className="h-4 w-4" or h-5 w-5 (not arbitrary)
  • ❌ Flag direct lucide-react imports or custom icon components

6. Shadows & Effects

  • ✅ Shadow scale: shadow-sm (cards), shadow-md (dropdowns), shadow-lg (modals)
  • ✅ Rounded corners: rounded-lg, rounded-md (not arbitrary values)
  • ❌ Flag custom shadow definitions or unusual border-radius values

7. Accessibility (WCAG 2.1 AA)

  • ✅ Buttons have accessible labels
  • ✅ Form inputs have associated labels
  • ✅ Interactive elements have focus states
  • ✅ Color contrast meets minimum ratios
  • ✅ Keyboard navigation is supported
  • ❌ Flag missing alt text, labels, or ARIA attributes where needed

8. Custom Components (Not in @thegpvc/ui)

For app-specific components that extend beyond the library:

  • ✅ Follow established design patterns (compound components, className props)
  • ✅ Use cn() utility for className merging
  • ✅ Accept and forward standard HTML props
  • ✅ Use theme tokens exclusively
  • ✅ Maintain consistency with @thegpvc/ui component APIs
  • ❌ Flag inline styles or component-scoped CSS

9. Anti-Patterns

Flag these common issues:

  • ❌ Mixing @thegpvc/ui with other UI libraries (MUI, shadcn, etc.)
  • ❌ Creating custom variants when @thegpvc/ui variants exist
  • ❌ Bypassing theme with arbitrary values
  • ❌ Inconsistent spacing patterns
  • ❌ Missing responsive design (not mobile-first)
  • ❌ Accessibility violations

Output Format

Provide findings in this structure:

✅ Strengths

  • List what's done well

⚠️ Issues Found For each issue:

  • Location: File and line number
  • Issue: What's wrong
  • Impact: Why it matters (consistency, accessibility, maintenance)
  • Fix: Specific code change needed

📋 Summary

  • Overall compliance score (Excellent / Good / Needs Work / Poor)
  • Priority fixes
  • Optional improvements

Example Review Output

✅ Strengths
- Proper use of Card compound components
- Theme tokens used consistently for colors
- Good accessibility with ARIA labels

⚠️ Issues Found

1. **Hard-coded colors**
   - Location: components/Dashboard.tsx:45
   - Issue: `className="bg-[#FF5500]"`
   - Impact: Breaks theme consistency, won't adapt to theme changes
   - Fix: Use `bg-orange-500` instead

2. **Custom button component**
   - Location: components/CustomButton.tsx
   - Issue: Duplicates @thegpvc/ui Button functionality
   - Impact: Maintenance burden, inconsistent styling
   - Fix: Replace with `<Button variant="primary">` from @thegpvc/ui

📋 Summary
- Overall: Needs Work
- Priority: Fix hard-coded colors (breaks theming)
- Optional: Consider migrating CustomButton in next sprint

Resources Available

Load the gp-ui skill for complete design tokens, component APIs, and style guide reference.

Sponsors

Details

Marketplace
thegpvc/gp-ui
Source
.claude-plugin
Category
Community