Contributing to Mantine
First of all, thank you for showing interest in contributing to Mantine! All your contributions are extremely valuable to the project!
Ways to contribute (Original Mantine)
- Improve documentation: Fix incomplete or missing docs, bad wording, examples or explanations.
- Give feedback: We are constantly working on making Mantine better. Please share how you use Mantine, what features are missing and what is done well via GitHub Discussions or Discord.
- Share Mantine: Share links to the Mantine docs with everyone who might be interested! Share Mantine on X here.
- Contribute to the codebase: Propose new features via GitHub Issues, or find an existing issue that you are interested in and work on it!
- Give us a code review: Help us identify problems with the source code or make Mantine more performant.
Ways to contribute (Thinker Mantine)
- Improve documentation: Fix incomplete or missing docs, bad wording, examples or explanations.
- Give feedback: Please share how you use Mantine, what features are missing and what is done well via our Discord server.
- Contribute to the codebase: Propose new features via Discord, or find an existing issue that you are interested in and work on it!
- Give us a code review: Help us identify problems with the source code or make Mantine more performant.
Contributing workflow
- Decide on what you want to contribute.
- If you would like to implement a new feature, discuss it with the maintainer (GitHub Discussions or Discord) before jumping into coding.
- After finalizing issue details, you can begin working on the code.
- Run tests with
npm testand submit a PR once all tests have passed. - Get a code review and fix all issues noticed by the maintainer.
- If you cannot finish your task or if you change your mind – that's totally fine! Just let us know in the GitHub issue that you created during the first step of this process. The Mantine community is friendly – we won't judge or ask any questions if you decide to cancel your submission.
- Your PR is merged. You are awesome ❤️!
Get started with Mantine locally
- Install the editorconfig extension for your editor.
- Fork the repository, then clone or download your fork.
- Run
nvm useto switch to the Node version specified in.nvmrcfile (install nvm). - Install dependencies with yarn –
yarn - Setup project –
npm run setup - Build local version of all packages –
npm run build all - To start storybook –
npm run storybook - To start docs –
npm run docs - To rebuild props descriptions –
npm run docs:docgen
npm scripts
All npm scripts are located at main package.json. Individual packages do not have dedicated scripts.
Development scripts
storybook– Starts the storybook development server. To start storybook for a specific component, use thenpm run storybook Tooltipcommand.docs– Starts the docs development server.
Testing scripts
syncpack– runs syncpacktypecheck– runs TypeScript typechecking withtsc --noEmiton all packages and docslint– runs ESLint on src folderjest– runs tests with jesttest– runs all above testing scripts
Docs scripts
docs:docgen– generates components types information with docgen scriptdocs:build– builds docs for productiondocs:deploy– builds and deploys docs to the GitHub Pages
Bump Base Mantine Version
- Please ensure that your current version of Thinker Mantine is up to date and all tests are passing.
- Run
git remote add mantine https://github.com/mantinedev/mantine.gitto add the original Mantine repository as a remote. - Run
git fetch mantineto fetch the latest changes from the original Mantine repository. - Run
git checkout mainto switch to the main branch. - Run
git merge mantine/mainto merge the latest changes from the original Mantine repository into your local main branch. - You may need to resolve merge conflicts, Please refer to the Resolve merge conflicts section below.
- Make sure to run
npm run setupandnpm run build allto update the dependencies and build the project. - Run
npm run testto ensure all tests are passing. - Run
npm run docsto ensure the docs are up to date and working. - Run
npm run storybookto ensure the storybook is up to date and working. - Make sure to update the version of the package in
package.jsonandpackage-lock.json. - Push the changes to your remote repository.
Resolve merge conflicts
- Please make sure to resolve all merge conflicts before pushing the changes to the remote repository.
- Rename all
@mantine/packages to@thinker-core/mantine-in allimportstatements,package.jsonandtest cases. - Note: DO NOT rename all references to folders (eg:
@mantine/core/src/core/MantineProvider/default-css-variables.cssto@thinker-core/mantine-core/src/core/MantineProvider/default-css-variables.css), only the import statements. - Rename all color palette variables. See Color Palette Differences.