Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@zendeskgarden/svg-icons

zendeskgarden168.8kApache-2.07.5.0

Garden SVG icons

garden, icons, svg, zendesk

readme

Garden SVG Icons npm version Build Status Dependency Status

:seedling: Garden is the design system by Zendesk

This repo packages a collection of SVG icons used throughout Zendesk products. All source icons are optimized for size + readability.

Installation

npm install @zendeskgarden/svg-icons

The package contains a src folder with individual SVG icons along with a combined "spritemap" dist of SVG symbols.

Usage

Garden SVGs come in two flavors – monochrome and two-tone. The primary fill/stroke will always be specified as currentColor. This means CSS text color style will cascade to the icon. Two-tone icons can receive a secondary color via the fill style property. In the following example, the top arrow of the "sort" icon will be blue; the bottom arrow will be red (see spritemap below for more re: SVG use with an external source).

<svg style="color: blue; fill: red;">
  <use xlink:href="index.svg#zd-svg-icon-12-sort-fill">
</svg>

Once installed, SVG icons may be accessed in a variety of ways. The following list demonstrates several possibilities, however usage will vary depending on the particular needs of your application.

  • JavaScript

    In the following snippet, a source SVG is loaded just like any other JS module. SVGs loaded in this manner will benefit from the same caching as any other JS asset.

    import ZendeskIcon from '@zendeskgarden/svg-icons/src/26/zendesk.svg';
    
    class ZendeskButton extends React.Component {
      render() {
        return (
          <button>
            <ZendeskIcon />
          </button>
        );
      }
    }
  • PostCSS

    Several Garden CSS Components utilize the postcss-inline-svg plugin to compile SVGs into CSS.

    1. Configure the plugin:
    "postcss-inline-svg": {
      "path": "node_modules/@zendeskgarden/svg-icons/src"
    }
    1. Load an SVG in your source CSS:
    .icon {
      background-image: svg-load('16/remove.svg', color: #007fab);
    }
    1. Build via postcss to inline the SVG into your destination CSS as a data URI:
    .icon {
      background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' color='%23007FAB' ...");
    }
  • Spritemap

    The main distribution from the npm package is an SVG "spritemap" containing all source icons as <symbol> elements. Once that file is hosted, any icon may be externally referenced using its unique ID.

    <svg>
      <use xlink:href="/path/to/index.svg#zd-svg-icon-16-chevron-down-stroke">
    </svg>

    By referencing the external resource, you take advantage of the browser cache. Subsequent <use xlink:href> will leverage the cached SVG spritemap. Note you'll need to use a polyfill like svg4everybody to compensate for browsers (IE9-11) that can't handle external SVG content.

  • Build pipeline

    There are numerous plugins for handling SVG files via an asset bundler (webpack, gulp, grunt, etc.). Search npm and select one that fits your needs.

Contribution

Thanks for your interest in Garden! Community involvement helps make our design system fresh and tasty for everyone.

Got issues with what you find here? Please feel free to create an issue.

If you'd like to take a crack at making some changes, please follow our contributing documentation for details needed to submit a PR.

Community behavior is benevolently ruled by a code of conduct. Please participate accordingly.

License

Copyright 2021 Zendesk

Licensed under the Apache License, Version 2.0

changelog

Changelog

All notable changes to this project will be documented in this file. See commit-and-tag-version for commit guidelines.

7.5.0 (2024-11-27)

Features

7.4.0 (2024-11-18)

Features

7.3.0 (2024-09-19)

Features

7.2.0 (2024-06-21)

Features

7.1.1 (2024-05-13)

Bug Fixes

7.1.0 (2024-04-17)

Features

7.0.0 (2023-10-12)

⚠ BREAKING CHANGES

  • applies an in-place update to the twitter-*.svg icons so that they now render the rebranded "X".

Features

6.34.0 (2023-09-22)

Features

  • added new document-search and eye-hide icons (#314) (4a6356d)

6.33.0 (2022-06-13)

Features

  • arrow-left-sm: add 12px and 16px icons (#274) (bdab0be)

6.32.0 (2022-04-11)

Features

6.31.1 (2022-02-04)

Bug Fixes

6.31.0 (2022-02-04)

Features

6.30.2 (2021-05-03)

6.30.1 (2021-03-31)

Bug Fixes

  • prevent husky from running on postinstall (#222) (f8e198a)

6.30.0 (2021-03-30)

Features

6.29.0 (2021-02-23)

Features

Bug Fixes

6.28.0 (2021-01-27)

Features

6.27.0 (2020-12-04)

Features

Bug Fixes

6.26.0 (2020-11-16)

Features

6.25.1 (2020-10-30)

Bug Fixes

  • adjust bold icons to better match typography (#197) (b078788)

6.25.0 (2020-10-20)

Features

6.24.0 (2020-10-07)

Features

Bug Fixes

6.23.0 (2020-09-18)

Features

6.22.0 (2020-08-11)

Features

6.21.0 (2020-08-03)

Features

  • add grid-add, headset, and workflow icons (#182) (9edc230)

6.20.0 (2020-07-24)

Features

6.19.0 (2020-07-13)

Features

  • add new 26px arrow-right-left icon (#173) (2872a41)
  • add new circle-line icons and resize existing circle icons to match (#174) (1c7685a)
  • add new public reply icon (#175) (e219bb5)
  • add new scheduled publishing icons (#172) (1bd38a3)

6.18.0 (2020-07-02)

Features

  • new link-remove icons and updated link icons (#170) (4cba586)

6.17.0 (2020-05-14)

Features

6.16.0 (2020-05-08)

Features

6.15.0 (2020-04-02)

Features

6.14.0 (2020-03-25)

Features

Bug Fixes

  • use default CircleCI node_modules cache (#150) (c98f8f0)

6.13.1 (2020-03-05)

6.13.0 (2020-03-05)

Features

  • new support, suite, and messaging wordmarks (#144) (fd23216)

6.12.0 (2020-02-21)

Features

6.11.0 (2020-02-19)

Features

6.10.0 (2020-01-23)

Features

6.9.0 (2019-12-13)

Features

6.8.1 (2019-11-20)

Bug Fixes

6.8.0 (2019-11-12)

Features

6.7.0 (2019-10-04)

Features

6.6.0 (2019-10-03)

Features

6.5.0 (2019-10-02)

Features

6.4.0 (2019-09-24)

Features

  • add new icons (fb, twitter, slack, whatsapp) (#120) (350cdf4)

6.3.1 (2019-07-18)

6.3.0 (2019-05-17)

Features

  • add new at icons and update sunshine icon (#84) (c10c34c)

6.2.0 (2019-05-06)

Features

  • add horizontal-rule and line-item-rtl icons (#82) (c784465)

6.1.1 (2019-03-28)

Bug Fixes

  • larger scale sunshine SVG to match relationshapes (#75) (6f8dac0)

6.1.0 (2019-03-21)

Features

6.0.0 (2019-03-12)

chore

BREAKING CHANGES

  • removes the following deprecated icons:
  • ALL 14/*.svg
  • 26/inbox.svg

5.3.1 (2019-03-07)

Bug Fixes

  • refine icon squared vs. rounded strokes (#70) (055cee7)

5.3.0 (2019-02-12)

Features

5.2.0 (2019-02-06)

Features

  • add 26px answer-bot and building icons (#56) (5f34f0f)

5.1.0 (2019-01-22)

Features

  • new cursor-arrow and megaphone icons (#53) (9849d42)

5.0.0 (2018-11-14)

Bug Fixes

BREAKING CHANGES

  • prunes outdated designs that are not intended for use.

4.5.0 (2018-11-13)

Features

4.4.5 (2018-09-05)

4.4.4 (2018-08-22)

4.4.3 (2018-08-15)

4.4.2 (2018-08-13)

4.4.1 (2018-08-07)

4.4.0 (2018-06-20)

Features

  • add circle-full, location, notes, and smile-slight icons (#8) (1f40021)

4.3.1 (2018-06-12)

4.3.0 (2018-06-01)

Features

4.2.0 (2018-05-23)

Features

4.1.0 (2018-05-17)

Features

  • add wordmarks for The Zendesk Suite (#4) (ea7e86b)

4.0.1 (2018-05-03)

Bug Fixes

4.0.0 (2018-04-11)

Features

BREAKING CHANGES

  • package location has moved to the npm registry under the @zendeskgarden scope. See the README for installation/upgrade details.

3.0.0 (2018-04-10)

Features

BREAKING CHANGES

  • source files are now partitioned into directories by size. Instead of finding icons under src/14-[name].svg or src/26-[name].svg, they are now located under src/14/[name].svg or src/26/[name].svg.

2.5.0 - 2017-12-18

Added (per #44)

  • 14-grip

2.4.0 - 2017-12-05

Added (per #43)

  • 26-credit-card
  • 26-person
  • 26-security

2.3.0 - 2017-09-05

Added (per #40)

  • 14-sort

2.2.0 - 2017-08-31

Added (per #39)

  • 14-dash

2.1.0 - 2017-06-23

Changed (per #37)

  • 14-date
  • 14-decimal
  • 14-dropdown
  • 14-multiline
  • 14-numeric
  • 14-regex
  • 14-text

Added

  • 14-checkmark-lg
  • 14-credit-card
  • 14-select-multiple

2.0.0 - 2017-05-31

Changed (per #36)

  • Prepared package for registry publish as @zendesk/garden-svg-icons. See README for updated installation.

1.5.0 - 2017-05-11

Added (per #35)

  • 26-customize

1.4.0 - 2017-04-19

Added (per #34)

  • 14-first
  • 14-last

1.3.1 - 2017-03-28

Changed

  • #33 26-wordmark-zendesk.

1.3.0 - 2017-03-27

Changed

  • #32 26-moderation.

1.2.0 - 2017-03-23

Added

  • #31 14-warning-fill.

Changed

  • Updated with increased stroke width and pixel alignment:
    • 14-checkmark-circle
    • 14-checkmark-fill
    • 14-error-fill
    • 14-error
    • 14-info
    • 14-menu
    • 14-refresh
    • 14-times-fill
    • 14-times

1.1.0 - 2017-03-22

Added

1.0.1 - 2017-03-03

Changed

  • #29 26-help-center remove rope loops.

1.0.0 - 2017-02-24

Changed

  • Renamed 26-relationshape-help-center to 26-relationshape.guide.

Removed (per #26)

  • 14-lotus
  • 14-success
  • 26-customer-lists
  • 26-email
  • 26-group
  • 26-home
  • 26-lotus
  • 26-person
  • 26-reporting
  • 26-role
  • 26-settings
  • 26-support
  • 26-views
  • 26-zopim-chat
  • All 116px illustrations.

0.15.0 - 2017-02-22

Added (per #23)

  • 14-fullscreen-enter
  • 14-fullscreen-exit

0.14.1 - 2017-02-17

Changed

  • #25 26-help-center pixel alignment.

0.14.0 - 2017-02-16

Added (per #22)

  • 26-arrange-content
  • 26-help-center
  • 26-knowledge-base
  • 26-moderation

0.13.1 - 2017-02-14

Fixed (per #21)

  • 14-decimal add height/width attributes.
  • 14-organization add height/width attributes.

0.13.0 - 2017-02-03

Added

Changed

  • Restyled demo pages.

0.12.0 - 2016-11-02

Added (per #18)

  • 26px product wordmark SVGs.

0.11.0 - 2016-10-26

Added (per #17)

  • 14-checkmark-circle
  • 14-checkmark-fill
  • 14-error-fill
  • 14-glasses
  • 14-times-fill
  • 14-times

Changed

  • 14-checkbox add missing height/width attributes.
  • 14-error tweak sizing.
  • #19 26-inbox remove fill-rule attribute.

0.10.0 - 2016-10-18

Added (per #16)

  • 26-zendesk "Z" logo.

0.9.0 - 2016-10-17

Added (per #11)

  • 26-inbox logo.

0.8.0 - 2016-10-13

Added (per #14)

  • 14-circle

0.7.0 - 2016-10-10

Added (per #13)

  • 26-bar-chart
  • 26-call-in
  • 26-chat
  • 26-checkbox
  • 26-clipboard
  • 26-clock
  • 26-cloud-upload
  • 26-customer-lists-fill
  • 26-dashboard
  • 26-email-fill
  • 26-group-fill
  • 26-home-fill
  • 26-line-chart
  • 26-settings-fill
  • 26-views-fill

0.6.1 - 2016-09-14

Changed (per #9)

  • Added focusable="false" attribute to all icons.

0.6.0 - 2016-09-09

Added (per #5)

  • Product relationshape-* logos.

0.5.0 - 2016-08-05

Added (per #7)

  • 116-arrow-right
  • 116-timer
  • #8 26-ellipsis

0.4.0 - 2016-07-28

Added

  • #6 14-bar-chart

0.3.1 - 2016-02-20

Changed

  • Updated package dependencies.

0.3.0 - 2016-01-15

Added

  • #2 14-checkmark

0.2.0 - 2016-01-13

Added

  • #1 14-twitter-heart

0.1.0 - 2015-12-17