Download icon
- Find the icon you want to use. Most icons are pulled from google fonts icons:
https://fonts.google.com/icons
- You will need to download the SVG of the icon.
- Here are the settings to use for a google font icon.
- Fill: False
- Weight: 400
- Grade: 0
- Optical Size: 20px
(set the size of the icon to 20 before you download the SVG for consistency for line weights.)
It is important to maintain similar line weights for similar apparent sizes of icons in the design system. Therefore if you making your own icon, or using a different source for and icon you should take this into consideration.
Were to manage the font
Font App:
We are using icomoon.io to manage the icon font. You can access the font manager app here:
https://icomoon.io/app/#/select
Font JSON GitHub:
The JSON for the icomoon.io font is saved in GitHub. You will need to check out this repository and commit any changes.
https://github.com/utahdts/utah-design-system-icons-font
Utah Design System GitHub:
The icon font is also used directly on the Utah Design System website and in the CSS of the Utah Design System. You will need to modify this as well when adding new glyphs to the font so that they can be used.
https://github.com/utahdts/utah-design-system
CDN GitHub:
The Design System is published on cdn.utah.gov. You will need to checkout and commit to the CDN repository to publish any changes.
https://github.com/utahdts/dts-cdn-website
Base64 Encoded Font:
You will need to base64 encode the WOFF font file and replace its value in the Utah Design System scss in the GitHub project above.
https://codepen.io/mrjoesharp/pen/MYwjxad
Importing the font into icomoon.io
- Checkout / Sync with the GitHub repository:
https://github.com/utahdts/utah-design-system-icons-font
- Visit the font manager app website:
https://icomoon.io/app/#/select
- If this is the first time using Icomoon you will start with an “
Untitled Project“.
- The font data is stored in your local storage. If you clear you cookies the project will be deleted. Make sure you export a copy of the font each time you make changes so that you don’t accidentally lose your work.
- Import the “
Utah Design System.json” file into Icomoon.
- Select “
Manage Projects” from the hamburger menu.
- If you already have a “
Utah Design System” project, you should delete it before importing the JSON below. Make sure all your previous changes are saved before doing this, as this will permanently delete the project.
- Click “Import Project”.
- Select the “
Utah Design System.json” file.
- Click the “
Load” link next to the project to load up the font.
- This will take you to the icon selection screen.
Add an icon in icomoon.io
The toolbar
- Select
Icons must be selected in order to be available in the font. A yellow border indicates the icon is selected.
- Delete
With this tool active you can delete icons. You get no warning when you delete an icon. But there is an undo feature if you mess up.
- Move
With this tool you can move an icon around in the list. You will be moving any icons you add to the end of the list.
- Edit
With this tool you will be editing the setting for individual icons. You will be using this tool as well.
- Drag the SVG of the icon onto the icomoon.io application window inside the utah-design-system font area.
- Using the select tool you will select your new icon so that it has a yellow border.
- Using the move tool you will drag the new icon to the end of the icon list.
- Using the edit tool you will do the following actions inside the popup modal. (Click the edit tool, then click on the new icon, this will open the edit modal):
→
- Click the Scale tool then click the Fit to Canvas.
- This will size the icon to the maximum size.
→
- Click the Canvas/Alignment tool then click Align to Center.
- This will center the icon if needed.
→
(If Needed)
- Click the Color tool then click the Remove Colors button.
- This is an important step that will set the color of the icon to the default.
- Edit the Tags and Names fields:
- Keep the tags and names fields the same.
- Use short words and dashes. Do not use spaces. Don’t use more that two words if possible. Use a single word if possible. This will be part of the css class to use the icon:
dark-mode
class="utds-icon-before-dark-mode"
mail
class="utds-icon-before-mail"
- You are done editing! Close the edit modal.
Select Generate Font tab at the bottom of the app page.
- Scroll down to the new icon and add a character code for the icon. Follow the pattern that has been established. Consult with Joseph if your not sure what the next character should be.
- The character code should automatically be set correctly, but double check.
- The character code is in Hexadecimal format: e.g:
...e928, e929, e92a, e92b, e92c, e92d, e92e, e92f, e930, e931...
- This code will be used when configuring the CSS in a future step.
- In the bottom tab there is now a button “Download” and a gear icon.
- Click on the gear icon an verify the top fields look like:

Close the popup.
- Click the “Download” button.
This will download a zip file with the different font files. You will need these font files in a future step.
- Inside the zip file you will find these font files, you will be using the WOFF file since it is the most compatible format:
utah-design-system.svg
utah-design-system.ttf
utah-design-system.woff
Add icons to the Utah Design System
It is best to create a new branch for the font changes from the dev branch. If the dev branch is under active development for a new version then you can branch from main in order to deploy the changes faster. All changes will need to be first merged to the dev branch then into the main branch. You will also need to update the version of the Design System and Changelog. A new version of the library will need to be deployed to NPM. Buckle up.
Add base64 icon font to the Utah Design System
- Go to https://codepen.io/mrjoesharp/pen/MYwjxad
- Click “Choose File” button and choose the WOFF file.
- Click “Copy” above the “Base64 font for @font-face”.
- In this file paste this code in the appropriate place in this file:
@utahdts/utah-design-system/css/1-settings/_icons.scss
Update code in Utah Design System
- Edit the file
@utahdts/utah-design-system/css/1-settings/_icons.scss
- Duplicate the last 4 lines of the css which looks like:
.utds-icon-before-logout::before,
.utds-icon-after-logout::after {
content: "\e93d";
}
- You will need to modify the css class to match the name you previously chose above.
- You will also need to provide the character code following the same pattern as the other icons. This is the “
content” as seen above.
- Edit the file
utah-design-system-website/src/react/components/websiteContent/resources/IconsDocumentation/Icons/ iconsDocumentationIcons.js
- Follow the same pattern and add a reference to the new icon at the bottom of this file also.
- This will allow visitors to view the icon under the resources section of the design system website.
- Edit the file
CHANGELOG.md found in the root of the repository.
- Add a new entry and version for the new icon. Typically this type of change would be a feature change such as 4.0.0 → 4.1.0.
- Search and replace all Utah Design System versions to update to the new version. Following the example above this is what you would search replace, ensuring that you are only modifying versions related to the design system.
- Search: 4.0.0
- Replace: 4.1.0
- Commit and push your changes to your branch and create a pull request into the
dev branch. The pull into the dev branch will trigger some automatic tests. These must pass in order to complete the pull request.
- Check designsystem.dev.utah.gov to make sure the site it up and running well.
- You will then need to pull the
dev branch into the main branch. This requires approval from one other person in order to complete the pull request.
- A successful pull request into the
main branch will trigger a build for the website: designsystem.utah.gov
Publish Changes
Use this article to publish your changes: https://dtsdevnote1dev.wpenginepowered.com/design-system/how-to-release-utah-design-system