The Strapi Design System is an open-source project administered by the Strapi team. We appreciate your interest and efforts to contribute to the Design System.
All efforts to contribute are highly appreciated, we recommend you open an issue prior to spending a lot of time making a pull request that may not align with the project roadmap.
This project and everyone participating in it are governed by the Strapi Code of Conduct. By participating, you are expected to uphold this code. Please read the full text so that you can read which actions may or may not be tolerated.
We are using GitHub Issues to manage our public bugs. We keep a close eye on this so before filing a new issue, try to make sure the problem does not already exist. You can also use the codesandbox template to easily show us the bug.
The design system follows the Strapi branding. We use Specify to be able to synchronise the design tokens with the design tools. Some parts of the codebase can not be modified including:
- Icons
packages/strapi-icons/assets/icons/
- Colors
packages/strapi-design-system/src/themes/colors.js
- Shadows
packages/strapi-design-system/src/themes/shadows.js
The core team will review your pull request and will either merge it, request changes to it, or close it.
Before submitting your pull request make sure the following requirements are fulfilled:
- Fork the repository and create your branch from
main
. - Run
yarn setup
in the repository root. - If you’ve fixed a bug or added code that should be tested, add the tests and then link the corresponding issue in either your commit or your PR.
- Ensure the test suites are passing:
yarn test
yarn test:e2e
(The storybook app must be running for the e2e testsyarn storybook
, you may need to install playwright browsers beforenpx playwright install
)
- Make sure your code lints (
yarn lint
).
Please follow the instructions below:
1. Fork the repository
Go to the repository and fork it to your own GitHub account.
git clone [email protected]:YOUR_USERNAME/design-system.git
Go to the root of the repository.
cd design-system
yarn setup
Start the storybook application to test your changes to components or their documentation.
yarn storybook
Start the DS website to test your changes on the documentation library.
cd website
yarn
yarn dev
yarn analyze:bundle
Start webpack bundle analyzer in all packages.yarn setup
Install dependencies and build all the packages.yarn lint
Lint the codebase.yarn storybook
Start the storybook app and load stories in files that end with .stories.mdx.yarn test
Run the design system tests.yarn test:watch
Run an interactive test watcher.yarn test:e2e
Run the end-to-end test suite.yarn test:e2e:watch
Run an interactive end-to-end test watcher.yarn test:snapshots
Generate snapshots.yarn test:start-app
Start the test application.yarn generate
Generate a new component.