Thank you for your interest in contributing to dnd-kit! This document provides guidelines and instructions for contributing to the project.
dnd-kit is a monorepo managed with Turborepo. The main packages are:
@dnd-kit/abstract: Core abstractions and utilities@dnd-kit/dom: DOM-specific implementation@dnd-kit/react: React-specific implementation@dnd-kit/geometry: Geometry utilities@dnd-kit/state: State management@dnd-kit/collision: Collision detection@dnd-kit/helpers: Shared helper functions
The project also includes:
apps/stories: Storybook stories for testing and demonstrating featuresapps/docs: Documentation site
- Fork and clone the repository
- Install dependencies:
bun install
- Build all packages:
bun run build
- Create a new branch for your feature or bugfix
- Start the development server
bun run dev
- Make your changes
- Verify that the packages build:
bun run build
- Submit a pull request
The project uses Storybook for testing and demonstrating features. To run stories:
bun run devWhen adding new features:
- Add stories to demonstrate usage
- Include different variations and edge cases
- Ensure stories are interactive and testable
Documentation is maintained in the apps/docs directory. When making changes:
- Update relevant documentation
- Add examples for new features
- Ensure code examples are working
- Follow the existing documentation style
To run the documentation site locally:
npm install -g mintlify
mintlify dev- Keep pull requests focused and small
- Include tests for new features
- Update documentation as needed
- Follow the existing code style
- Provide a clear description of changes
- Add changeset if your changes affect the public API
- Add or update stories for new features
- Update documentation if needed
- Use TypeScript for all new code
- Follow the project's ESLint configuration
- Use meaningful variable and function names
- Add appropriate comments and documentation
- Keep functions small and focused
- Write tests for new features
- Ensure all tests pass
- Maintain or improve test coverage
- Test across different browsers and devices
- Add stories for visual testing
- Update documentation with examples
- Update README files as needed
- Add JSDoc comments for new code
- Keep documentation up to date
- Provide examples for new features
- Add stories to demonstrate usage
- Ensure documentation is accurate and clear
This project uses Changesets to manage releases. When making changes that affect the public API:
- Add a changeset:
bun run changeset
- Follow the prompts to describe your changes
- The changeset will be included in the next release
The release process is automated and will:
- Update version numbers based on changesets
- Update CHANGELOG.md
- Create release tags
- Publish to npm
If you have any questions, feel free to:
- Open an issue
- Join our Slack community