Contributing to RigidUI
Thank you for your interest in contributing to RigidUI! We welcome contributions from the community, whether it’s new components, bug fixes, documentation improvements, or feature enhancements.Before contributing, please read and follow our Code of Conduct to foster an inclusive and respectful community.
Getting Started
Install Dependencies
Install project dependencies using pnpm:
We recommend using pnpm for development to ensure consistency with the project setup.
Start Development Server
Launch the development server to see your changes in real-time:Visit
http://localhost:3000 to view the documentation site.Project Structure
Understanding the project structure will help you navigate the codebase:Component Guidelines
When creating or modifying components, follow these essential guidelines:Self-Contained
Components should be self-contained with minimal external dependencies
Accessible
Follow WAI-ARIA guidelines and ensure keyboard navigation works
Responsive
Components should work well on all screen sizes
Customizable
Use Tailwind CSS classes and accept className props
TypeScript
Write proper TypeScript types for all props and functions
Dark Mode
Support both light and dark modes out of the box
Documented
Include JSDoc comments and create demo files
Tested
Test components thoroughly before submission
Creating a New Component
Follow these steps to create a new component for RigidUI:Pull Request Process
Create a Branch
Create a descriptive branch name for your changes:
Use prefixes like
feature/, fix/, docs/, or refactor/ to categorize your changes.Test Thoroughly
Test your component in different scenarios:
- Different screen sizes (mobile, tablet, desktop)
- Light and dark modes
- Keyboard navigation
- Edge cases and error states
Update Documentation
If you’re adding a new feature or component, update the documentation accordingly.
Create a Changeset
Document your changes using changesets:Follow the prompts to describe your changes in a user-friendly way.
Push and Create PR
Push your branch and create a pull request:Then create a pull request to the
main branch on GitHub.Commit Guidelines
We follow Conventional Commits for clear and consistent commit messages:Commit Types
Commit Types
feat:- A new featurefix:- A bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code changes that neither fix bugs nor add featuresperf:- Performance improvementstest:- Adding or updating testschore:- Changes to the build process or auxiliary tools
Examples
Examples
Component Quality Checklist
Before submitting your component, ensure it meets these quality standards:Code Quality
Code Quality
- Component is properly typed with TypeScript
- JSDoc comments are included for props and functions
- Code follows the project’s formatting standards
- No console.log or debug statements left in code
- Component is self-contained with minimal dependencies
Functionality
Functionality
- Component works as expected in all scenarios
- Error states are handled gracefully
- Loading states are implemented where appropriate
- Component accepts className prop for customization
- Default values are sensible and well-documented
Accessibility
Accessibility
- Component is keyboard navigable
- ARIA attributes are used appropriately
- Focus states are visible and logical
- Screen reader compatibility is tested
- Color contrast meets WCAG standards
Styling & Responsiveness
Styling & Responsiveness
- Component works on mobile, tablet, and desktop
- Dark mode is fully supported
- Tailwind CSS classes are used for styling
- Component respects user’s reduced motion preferences
- Spacing and sizing are consistent with other components
Documentation
Documentation
- Demo file is created to showcase usage
- Component is added to registry.json
- Documentation page is created in app/docs
- Props and usage examples are clearly documented
- Edge cases and limitations are noted
Need Help?
If you have questions or need assistance:GitHub Discussions
Ask questions and discuss ideas with the community
GitHub Issues
Report bugs or request new features
Recognition
All contributors will be recognized in our documentation and README. We appreciate every contribution, no matter how small!By contributing to RigidUI, you agree that your contributions will be licensed under the MIT License.