👍 Thanks for taking the time to contribute!
What should I know before I get started?
It's helpful to read the post about old and new ideas in React UI to understand the concepts used in the project.
-
Bug fixes: If you spot a bug in the codebase or in the documentation, please feel free to report it or create a pull request to fix it.
-
Documentation: If you encounter a section of the documentation which is unclear or simply incomplete, please feel free to reach out
-
Components: React UI has a small set of core components. Contributions to the ecosystem are more than welcome.
-
Examples: If you are building a website/application with React UI or have a prototype based on the CodeSandbox template, please feel free to share it with me.
-
Clone the repository
Run this command on your terminal:
git clone https://github.com/siddharthkp/react-ui.git
-
Run
yarn
to install dependencies.It's recommended to use yarn instead of npm because the project uses a
yarn.lock
file to make sure you get the exact version of dependencies as intended. -
There are a few
packages
inside the repository. The interesting ones are:- packages/docs: This is the documentation site for React UI
- packages/react-ui: This is the components package
- packages/example: This is examples build with React UI
Each of these have their own scripts inside
package.json
. For example, to work on the documentation website, you can runcd packages/docs yarn start
You don't have to install dependencies again for each package. React UI uses [yarn workspaces(https://classic.yarnpkg.com/en/docs/workspaces/) - which means you can use the local version of react-ui package inside the documentation website.
-
The recommended way of testing a component is in by running the documentation site.
To do this, start the docs site
cd packages/docs yarn start
and run react-ui in development mode
cd packages/react-ui yarn dev
Now, any changes made to the components or primitives will reflect in the documentation.
-
Builds and publishing
To build the components package, run
yarn build
inpackages/react-ui
.The documentation site is automatically deployed from the base branch:
main
If you'd like to learn how to create a pull request, this guide is really helpful.