@creativecodeco/ui is the official Design System for CreativeCode.com.co. It provides a set of reusable, accessible, and highly customizable UI components built with modern web technologies.
- Framework: React 18
- Styling: Tailwind CSS v4 (CSS-first configuration)
- UI Base: DaisyUI v5
- Documentation: Storybook 10
- Language: TypeScript
- Testing: Jest & React Testing Library
- Visual QA: Chromatic
The project follows an organized, modular structure designed for scalability and ease of maintenance:
src/ui/components/: Atomic UI components likeButton,Avatar,Badge, andAccordion. These are designed to be "dumb" components focused on presentation.src/ui/forms/: specialized components for form handling, such asTextbox,Checkbox,Radio, andDropdown.src/ui/provider/: Contains theCreativeCodeUIProvider, which manages the application's theme (viadata-theme) and provides necessary context for components.src/theme/: The heart of the design system's styling. It uses Tailwind CSS v4's CSS-first approach.main.cssis the entry point that imports component-specific styles and Tailwind/DaisyUI plugins.src/hooks/: Custom React hooks shared across the library and available to consumers.src/helpers/&src/utils/: Utility functions for internal logic (e.g., class merging, URL validation).src/types/: Global TypeScript definitions.
Each component typically resides in its own directory with:
[Component].tsx: The implementation.[Component].stories.tsx: Storybook definitions for documentation and testing.[Component].spec.tsx: Unit tests (if applicable).index.ts: Public export for that component.
The project has migrated to Tailwind CSS v4.
- CSS-first: Configuration is handled in
.cssfiles using@themeand@plugin. - DaisyUI Integration: Base styles and themes are derived from DaisyUI and extended with CreativeCode's brand identity.
- Theme Switching: Controlled via the
CreativeCodeUIProviderwhich appliesdata-theme="creativecode"to thehtmlelement.
- Component Creation: Develop one component at a time using Storybook (
npm run dev). - Visual Verification: Every PR triggers a Chromatic build to ensure no visual regressions occur.
- Building: The library is built into the
lib/directory using TypeScript (npm run build), producing ESM-compatible code. - Publishing: Managed via
npm versionandnpm publish.
- Accessibility (A11y): Components should use semantic HTML and support ARIA attributes.
- Responsiveness: Use Tailwind's utility classes for a mobile-first approach.
- Consistency: All components must adhere to the defined theme tokens (colors, spacing, typography).