Thank you for your interest in contributing to DynamicUI! We welcome contributions from the community and are excited to see what you can help us build.
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful, inclusive, and professional in all interactions.
- Node.js 18+
- npm 7+ (for workspaces support)
- Git
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/dynamicui.git cd dynamicui -
Install dependencies:
npm install
-
Build the library:
npm run build:lib
-
Start the development server:
npm run dev
-
Create a new branch for your feature:
git checkout -b feature/your-feature-name
dynamic-ui/
├── packages/
│ ├── dynamicui/ # Main UI library
│ │ ├── src/
│ │ │ ├── components/ # React components
│ │ │ ├── utils/ # Utility functions
│ │ │ └── index.ts # Main exports
│ │ └── package.json
│ │
│ └── showcase/ # Documentation website
│ ├── src/app/ # Next.js pages
│ └── package.json
│
└── package.json # Root workspace
Create a new file in packages/dynamicui/src/components/YourComponent.tsx:
import React from "react";
import { cn } from "../utils/cn";
export interface YourComponentProps {
children?: React.ReactNode;
variant?: "default" | "primary";
className?: string;
}
const YourComponent: React.FC<YourComponentProps> = ({
children,
variant = "default",
className,
...props
}) => {
return (
<div
className={cn(
"base-styles",
variant === "primary" && "primary-styles",
className,
)}
{...props}
>
{children}
</div>
);
};
YourComponent.displayName = "YourComponent";
export default YourComponent;Add exports to packages/dynamicui/src/index.ts:
export { default as YourComponent } from "./components/YourComponent";
export type { YourComponentProps } from "./components/YourComponent";Create examples in the showcase website at packages/showcase/src/app/components/page.tsx.
npm run build:lib
npm run dev- Accessible: Follow WCAG guidelines
- Composable: Components should work well together
- Customizable: Support className and style props
- Consistent: Follow established patterns
- TypeScript: Full type safety
- Use Tailwind CSS classes
- Use the
cnutility for class merging - Support dark/light themes
- Follow responsive design principles
- Use descriptive prop names
- Provide sensible defaults
- Support standard HTML attributes via spread props
- Include proper TypeScript definitions
Currently, we're focusing on manual testing via the showcase website. Automated testing will be added in the future.
- Add your component to the showcase website
- Test all variants and props
- Verify responsive behavior
- Check accessibility with screen readers
Each component should include:
- Clear description of purpose
- Props table with types and descriptions
- Usage examples (basic and advanced)
- Accessibility notes
- Styling customization examples
- Use JSDoc comments for component props
- Comment complex logic
- Include examples in comments where helpful
- Create a clear PR title describing the change
- Fill out the PR template (if available)
- Include screenshots for UI changes
- Update documentation as needed
- Ensure builds pass locally
- Code builds successfully
- Component works in showcase website
- TypeScript types are correct
- Documentation is updated
- Follows existing code style
Use clear, descriptive commit messages:
feat(Button): add loading state support
fix(Input): resolve focus ring issue
docs(Card): update examples and props table
When reporting bugs, please include:
- Description: Clear description of the issue
- Steps to reproduce: Detailed steps
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Environment: Browser, OS, Node.js version
- Screenshots: If applicable
For feature requests, please include:
- Use case: Why is this feature needed?
- Proposed API: How should it work?
- Examples: Mockups or examples from other libraries
- Priority: How important is this feature?
- Use TypeScript for all new code
- Follow existing patterns and conventions
- Use meaningful variable and function names
- Keep components focused and single-purpose
- One component per file
- Use PascalCase for component files
- Group related utilities together
- Keep exports organized in index files
- Minimize bundle size impact
- Avoid unnecessary re-renders
- Use React best practices
- Consider tree-shaking implications
- Complete Core Components - Button, Input, Card, Select, etc.
- Theming System - Dark/light mode support
- Testing Framework - Automated component testing
- Accessibility - Full WCAG compliance
- Documentation - Comprehensive guides and examples
- Storybook integration
- Figma design tokens
- Animation system
- Advanced theming
- Component composition patterns
- Questions: Open a GitHub Discussion
- Bugs: Create a GitHub Issue
- Chat: Join our community (link coming soon)
- Email: Contact us at hello@dynamicpixels.dev
Contributors will be recognized in our README and changelog. We appreciate all contributions, no matter how small!
By contributing to DynamicUI, you agree that your contributions will be licensed under the MIT License.
Thank you for helping make DynamicUI better! 🚀