Carbon components typically use icons on 16px artboards. Icons on 20px, 24px, and 32px artboards can also be used within the UI. Be sure icon size is consistent throughout your product.
All touch targets for interactive icons need to be 44px or larger. Developers can add padding to a touch target with CSS to meet the 44px requirement.
Icons are always a solid, monochromatic color and need to pass the same color contrast ratio as typography (4.5:1). The color of the icon should reflect the importance of the icon’s action which should always be to help guide a user. For more information on color, see the Color guidelines.
It’s also important to note that Carbon v10 icons themselves do not have interaction states, only their backgrounds do.
When used next to text, icons should be center-aligned.
Full installation details can be found in the Carbon icons GitHub repo.
carbon-icons ships with two main SVG files:
|carbon-icons.svg||Contains current icons (consolidated subset of legacy icons used in IBM Bluemix)|
|carbon-icons.json||JSON file created from carbon-icons.svg, used in Carbon|
|carbon-icons.js||JS module created from carbon-icons.svg, used in |
|icons.json||legacy JSON file created from sprite.svg|
|legacy-icons.js||JS module created from sprite.svg|
For screen reader accessibility, provide a context-rich title for the SVG using
<svg><title>Add a new service</title><use xlink:href="/carbon-icons/dist/icon--add--glyph"></use></svg>
If support for older browsers is needed, use the
aria-labelledby attribute to reference the
<title> element using an
<title> element will be read by the screen reader to the user, so it should describe its purpose.
Make sure that you do not duplicate this
<svg aria-labelledby="add"><title id="add">Add a new service</title><use xlink:href="/carbon-icons/dist/icon--add"></use></svg>