# @buster/ui-components A shared UI component library built with React, TypeScript, and Tailwind CSS v4. This package provides reusable components, hooks, and utilities that can be used across both the web application and server-side rendering contexts. ## Overview This package serves as the central design system for the Buster monorepo, ensuring consistency across all applications. It includes: - **Components**: Reusable React components with TypeScript support - **Hooks**: Custom React hooks for common functionality - **Utilities**: Helper functions and shared logic - **Styles**: Tailwind CSS v4 configuration with custom theme ## Installation Since this is a workspace package in the monorepo, it's automatically available to other packages. In your app's `package.json`: ```json { "dependencies": { "@buster/ui-components": "workspace:*" } } ``` ## Usage ### Importing Components ```typescript import { Button, Card, Input } from '@buster/ui-components/components'; ``` ### Importing Hooks ```typescript import { useTheme, useDebounce } from '@buster/ui-components/hooks'; ``` ### Importing Utilities ```typescript import { cn, formatDate } from '@buster/ui-components/lib'; ``` ### Using Tailwind Styles The package includes Tailwind CSS v4 with custom theme configuration. Import the styles in your app: ```css @import "@buster/ui-components/styles"; ``` ## Tailwind CSS v4 Configuration This package uses Tailwind CSS v4's new `@theme` directive for configuration. Custom colors, fonts, and other design tokens are defined in the CSS file using CSS variables. ### Theme Structure ```css @theme { /* Custom Colors */ --color-primary: /* defined in styles */ --color-secondary: /* defined in styles */ /* Custom Fonts */ --font-sans: /* defined in styles */ /* Custom Spacing, etc. */ } ``` ### Using Theme Values Theme values can be used with Tailwind utility classes: ```jsx