{"componentChunkName":"component---src-pages-guidelines-iconography-usage-mdx","path":"/guidelines/iconography/usage/","webpackCompilationHash":"aaa6c4cbb44f8ca938e9","result":{"pageContext":{"isCreatedByStatefulCreatePages":true,"frontmatter":{"label":"Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.","title":"Iconography","description":"Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.","tabs":["Usage","Library","Contribute"]},"relativePagePath":"/guidelines/iconography/usage.mdx","titleType":"prepend","MdxNode":{"id":"8d1a3a6c-81d9-518c-9752-d31bc34e1add","children":[],"parent":"f69cf157-a70a-50ea-b176-c7c9f3417a8e","internal":{"content":"---\nlabel: Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.\ntitle: Iconography\ndescription: Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.\ntabs: ['Usage', 'Library', 'Contribute']\n---\n\n### Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.\n\n## Resources\n\n<Row className=\"resource-card-group\">\n<Column colLg={4} colMd={4} noGutterSm>\n  <ResourceCard\n    subTitle=\"Elements package: Icons\"\n    href=\"https://github.com/carbon-design-system/carbon/tree/master/packages/icons\"\n    >\n\n<MdxIcon name=\"github\" />\n\n  </ResourceCard>\n</Column>\n<Column colLg={4} colMd={4}  noGutterSm>\n  <ResourceCard\n    subTitle=\"Elements package: Icons-React\"\n    href=\"https://github.com/carbon-design-system/carbon/tree/master/packages/icons-react\"\n    >\n\n<MdxIcon name=\"github\" />\n\n </ResourceCard>\n</Column>\n<Column colLg={4} colMd={4}  noGutterSm>\n  <ResourceCard\n    subTitle=\"Get the IBM Icons (16px, 20px) library\"\n    href=\"sketch://add-library/cloud/KW2yr\"\n    >\n      <MdxIcon name=\"sketch\" />\n </ResourceCard>\n</Column>\n<Column colLg={4} colMd={4}  noGutterSm>\n  <ResourceCard\n    subTitle=\"Get the IBM Icons (24px, 32px) library\"\n    href=\"sketch://add-library/cloud/2bwkM\"\n    >\n      <MdxIcon name=\"sketch\" />\n </ResourceCard>\n</Column>\n</Row>\n\n<br />\n<br />\n\n## Designing with icons\n\n### Sizing\n\nCarbon 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.\n\n![icon sizing](images/iconography_usage_sizing-alt.svg)\n\n![icon alignment](images/iconography-usage-sizing-2.svg)\n\n<Caption>\n  16px and 20px icons are optimized to feel balanced when paired with 14pt and\n  16pt IBM Plex. Use 24px and 32px when larger icons are needed.\n</Caption>\n\n<Row>\n<Column colMd={4} colLg={4}>\n  <DoDontExample\n    type=\"do\"\n    caption=\"Do use the correct icon size with IBM Plex.\">\n\n![proper sizing](images/iconography-usage-sizing-3.svg)\n\n  </DoDontExample>\n</Column>\n<Column colMd={4} colLg={4} >\n  <DoDontExample caption=\"Don’t alter the icon-text size ratio.\">\n\n![improper sizing](images/iconography-usage-sizing-4.svg)\n\n  </DoDontExample>\n</Column>\n</Row>\n\n### Touch targets\n\nAll 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.\n\n![touch target padding](images/iconography-usage-padding-6.svg)\n\n<Caption>\n  The menu button that is also a touch target may have a 20px ✕ 20px icon\n  centered in a 48px ✕ 48px button.\n</Caption>\n\n### Color\n\nIcons 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](/guidelines/color).\n\nIt's also important to note that Carbon v10 icons themselves do not have interaction states, only their backgrounds do.\n\n<Row>\n<Column colMd={4} colLg={4}>\n  <DoDontExample\n    type=\"do\"\n    caption=\"Do match your icon color with your text color when pairing them.\">\n\n![proper alignment](images/iconography-color-01.png)\n\n  </DoDontExample>\n</Column>\n<Column colMd={4} colLg={4} >\n  <DoDontExample caption=\"Don’t use different colors for text and icons.\">\n\n![improper alignment](images/iconography-color-02.png)\n\n  </DoDontExample>\n</Column>\n</Row>\n\n### Alignment\n\nWhen used next to text, icons should be center-aligned.\n\n<Row>\n<Column colMd={4} colLg={4}>\n  <DoDontExample\n    type=\"do\"\n    caption=\"Do center-align icons when they’re next to text.\">\n\n![proper alignment](images/iconography-usage-sizing-5.svg)\n\n  </DoDontExample>\n</Column>\n<Column colMd={4} colLg={4} >\n  <DoDontExample caption=\"Don’t baseline-align icons to the text.\">\n\n![improper alignment](images/iconography-usage-sizing-6.svg)\n\n  </DoDontExample>\n</Column>\n</Row>\n\n## Developing with icons\n\n### SVG Icons\n\n#### Requirements:\n\nInstall `carbon-icons`.\n\nFull installation details can be found in the Carbon icons [GitHub repo](https://github.com/carbon-design-system/carbon-icons).\n\n### Main files\n\n`carbon-icons` ships with two main SVG files:\n\n| Filename            | Description                                                                                             | Supported versions |\n| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------ |\n| _carbon-icons.svg_  | Contains current icons (consolidated subset of legacy icons used in IBM Bluemix)                        | `3.x` & newer      |\n| _carbon-icons.json_ | JSON file created from carbon-icons.svg, used in [Carbon](/guidelines/iconography/library)              | `3.x` & newer      |\n| _carbon-icons.js_   | JS module created from carbon-icons.svg, used in `Icon` React Component in [carbon-components-react](#) | `3.x` & newer      |\n| _icons.json_        | legacy JSON file created from sprite.svg                                                                | `1.x`,`2.x`&`3.x`  |\n| _legacy-icons.js_   | JS module created from sprite.svg                                                                       | `3.x` only         |\n\n### Accessibility\n\nFor screen reader accessibility, provide a context-rich title for the SVG using `<title>` element.\n\n```html\n<svg>\n  <title>Add a new service</title>\n  <use xlink:href=\"/carbon-icons/dist/icon--add--glyph\"></use>\n</svg>\n```\n\nIf support for older browsers is needed, use the `aria-labelledby` attribute to reference the `<title>` element using an `id`.\n\nThe `<title>` element will be read by the screen reader to the user, so it should describe its purpose.\n\nMake sure that you do not duplicate this `id`.\n\n```html\n<svg aria-labelledby=\"add\">\n  <title id=\"add\">Add a new service</title>\n  <use xlink:href=\"/carbon-icons/dist/icon--add\"></use>\n</svg>\n```\n\n#### For more details on accessibility, see the following resources:\n\n<br />\n\n- \"Accessible SVGs\" via [CSS-Tricks](https://css-tricks.com/accessible-svgs/)\n- \"5.4 The 'desc' and 'title' elements\" via [W3C.org](https://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements)\n","type":"Mdx","contentDigest":"08122ca599c2f0bd5c2d6e72efe274c5","counter":1213,"owner":"gatsby-plugin-mdx"},"frontmatter":{"title":"Iconography","label":"Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.","description":"Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.","tabs":["Usage","Library","Contribute"]},"exports":{},"rawBody":"---\nlabel: Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.\ntitle: Iconography\ndescription: Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.\ntabs: ['Usage', 'Library', 'Contribute']\n---\n\n### Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.\n\n## Resources\n\n<Row className=\"resource-card-group\">\n<Column colLg={4} colMd={4} noGutterSm>\n  <ResourceCard\n    subTitle=\"Elements package: Icons\"\n    href=\"https://github.com/carbon-design-system/carbon/tree/master/packages/icons\"\n    >\n\n<MdxIcon name=\"github\" />\n\n  </ResourceCard>\n</Column>\n<Column colLg={4} colMd={4}  noGutterSm>\n  <ResourceCard\n    subTitle=\"Elements package: Icons-React\"\n    href=\"https://github.com/carbon-design-system/carbon/tree/master/packages/icons-react\"\n    >\n\n<MdxIcon name=\"github\" />\n\n </ResourceCard>\n</Column>\n<Column colLg={4} colMd={4}  noGutterSm>\n  <ResourceCard\n    subTitle=\"Get the IBM Icons (16px, 20px) library\"\n    href=\"sketch://add-library/cloud/KW2yr\"\n    >\n      <MdxIcon name=\"sketch\" />\n </ResourceCard>\n</Column>\n<Column colLg={4} colMd={4}  noGutterSm>\n  <ResourceCard\n    subTitle=\"Get the IBM Icons (24px, 32px) library\"\n    href=\"sketch://add-library/cloud/2bwkM\"\n    >\n      <MdxIcon name=\"sketch\" />\n </ResourceCard>\n</Column>\n</Row>\n\n<br />\n<br />\n\n## Designing with icons\n\n### Sizing\n\nCarbon 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.\n\n![icon sizing](images/iconography_usage_sizing-alt.svg)\n\n![icon alignment](images/iconography-usage-sizing-2.svg)\n\n<Caption>\n  16px and 20px icons are optimized to feel balanced when paired with 14pt and\n  16pt IBM Plex. Use 24px and 32px when larger icons are needed.\n</Caption>\n\n<Row>\n<Column colMd={4} colLg={4}>\n  <DoDontExample\n    type=\"do\"\n    caption=\"Do use the correct icon size with IBM Plex.\">\n\n![proper sizing](images/iconography-usage-sizing-3.svg)\n\n  </DoDontExample>\n</Column>\n<Column colMd={4} colLg={4} >\n  <DoDontExample caption=\"Don’t alter the icon-text size ratio.\">\n\n![improper sizing](images/iconography-usage-sizing-4.svg)\n\n  </DoDontExample>\n</Column>\n</Row>\n\n### Touch targets\n\nAll 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.\n\n![touch target padding](images/iconography-usage-padding-6.svg)\n\n<Caption>\n  The menu button that is also a touch target may have a 20px ✕ 20px icon\n  centered in a 48px ✕ 48px button.\n</Caption>\n\n### Color\n\nIcons 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](/guidelines/color).\n\nIt's also important to note that Carbon v10 icons themselves do not have interaction states, only their backgrounds do.\n\n<Row>\n<Column colMd={4} colLg={4}>\n  <DoDontExample\n    type=\"do\"\n    caption=\"Do match your icon color with your text color when pairing them.\">\n\n![proper alignment](images/iconography-color-01.png)\n\n  </DoDontExample>\n</Column>\n<Column colMd={4} colLg={4} >\n  <DoDontExample caption=\"Don’t use different colors for text and icons.\">\n\n![improper alignment](images/iconography-color-02.png)\n\n  </DoDontExample>\n</Column>\n</Row>\n\n### Alignment\n\nWhen used next to text, icons should be center-aligned.\n\n<Row>\n<Column colMd={4} colLg={4}>\n  <DoDontExample\n    type=\"do\"\n    caption=\"Do center-align icons when they’re next to text.\">\n\n![proper alignment](images/iconography-usage-sizing-5.svg)\n\n  </DoDontExample>\n</Column>\n<Column colMd={4} colLg={4} >\n  <DoDontExample caption=\"Don’t baseline-align icons to the text.\">\n\n![improper alignment](images/iconography-usage-sizing-6.svg)\n\n  </DoDontExample>\n</Column>\n</Row>\n\n## Developing with icons\n\n### SVG Icons\n\n#### Requirements:\n\nInstall `carbon-icons`.\n\nFull installation details can be found in the Carbon icons [GitHub repo](https://github.com/carbon-design-system/carbon-icons).\n\n### Main files\n\n`carbon-icons` ships with two main SVG files:\n\n| Filename            | Description                                                                                             | Supported versions |\n| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------ |\n| _carbon-icons.svg_  | Contains current icons (consolidated subset of legacy icons used in IBM Bluemix)                        | `3.x` & newer      |\n| _carbon-icons.json_ | JSON file created from carbon-icons.svg, used in [Carbon](/guidelines/iconography/library)              | `3.x` & newer      |\n| _carbon-icons.js_   | JS module created from carbon-icons.svg, used in `Icon` React Component in [carbon-components-react](#) | `3.x` & newer      |\n| _icons.json_        | legacy JSON file created from sprite.svg                                                                | `1.x`,`2.x`&`3.x`  |\n| _legacy-icons.js_   | JS module created from sprite.svg                                                                       | `3.x` only         |\n\n### Accessibility\n\nFor screen reader accessibility, provide a context-rich title for the SVG using `<title>` element.\n\n```html\n<svg>\n  <title>Add a new service</title>\n  <use xlink:href=\"/carbon-icons/dist/icon--add--glyph\"></use>\n</svg>\n```\n\nIf support for older browsers is needed, use the `aria-labelledby` attribute to reference the `<title>` element using an `id`.\n\nThe `<title>` element will be read by the screen reader to the user, so it should describe its purpose.\n\nMake sure that you do not duplicate this `id`.\n\n```html\n<svg aria-labelledby=\"add\">\n  <title id=\"add\">Add a new service</title>\n  <use xlink:href=\"/carbon-icons/dist/icon--add\"></use>\n</svg>\n```\n\n#### For more details on accessibility, see the following resources:\n\n<br />\n\n- \"Accessible SVGs\" via [CSS-Tricks](https://css-tricks.com/accessible-svgs/)\n- \"5.4 The 'desc' and 'title' elements\" via [W3C.org](https://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements)\n","fileAbsolutePath":"/tmp/42b44a0/src/pages/guidelines/iconography/usage.mdx"}}}}