Thank you for your interest in contributing to Ionicons! 🎉
This document outlines the guidelines and processes for contributing to this project.
Please read our Contributor Code of Conduct for information on our rules of conduct. By contributing to Ionicons, you agree to abide by its terms.
-
We recommend using nvm (Node Version Manager) to manage Node.js versions:
- For macOS/Linux:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash - For Windows: Use nvm-windows
- Install and use the LTS version:
nvm install --lts && nvm use --lts
Alternatively, you can download the installer for the LTS version of Node.js directly.
- For macOS/Linux:
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/ionicons.git cd ionicons -
Add the original repository as an upstream remote:
git remote add upstream https://github.com/ionic-team/ionicons.git
-
Create a new branch from
mainfor your change:git checkout -b your-feature-branch
-
Install dependencies:
npm install
-
Run the initial build:
npm run build
-
If desired, modify the Icon Component
-
Or, modify and preview the site
- Always create a new branch from
mainfor your changes:git checkout main git pull upstream main git checkout -b your-feature-branch
If you're modifying the ion-icon component:
- Navigate to
src/components/directory and open theiconcomponent to modify - Make your changes to the component code
- Test your changes (see Testing Changes)
To preview component changes:
-
Run:
npm start
This will start a local version of the icon test with a test page
-
Modify the test page in
index.htmlas needed to test your changes -
If you are modifying icons, you can run
npm run build.filesto re-run the SVG optimization script to verify there are no changes after optimizing the SVG
- This project uses Prettier for code formatting
- Run
npm run prettierto format your code before submitting
- Run
npm run buildto build the complete package - Run
npm run build.filesto rebuild only the SVG icon files
Please submit issues for:
- Bug reports
- Feature requests
- General questions about the project
When creating issues:
-
If you have a question about using Ionicons, please ask on the Ionic Forum or in the Ionic Discord.
-
It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable.
-
The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
-
Check if a similar issue already exists by searching through existing issues. You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
-
Use the provided issue templates and clearly describe:
- Expected behavior
- Actual behavior
- Steps to reproduce (for bugs)
- Browser/device information when relevant
-
Create a new issue that thoroughly explains the problem.
-
Before submitting a Pull Request (PR), please:
- Create an issue first to discuss the proposed changes
- Comment on an existing issue mentioning you'd like to work on it
- Look for issues labeled with
help wantedif you're new to the project
-
Creating the PR:
- Update your fork to the latest upstream main
- Make your changes in a new git branch
- Follow the code style of the project
- Include relevant tests
- Make sure all tests pass:
npm test - Update documentation if needed
- Create a new pull request with the
mainbranch as the base.