Icons

Icons add a visual layer to written information. They should be used to inform and enhance components. The purpose of the icon will determine whether or not it needs to receive focus or not.


How to add an SVG

Our SVGs are created using a JS webpack pack: ut-icons.js. These take the icons from our Toolkit, add the SVGs in Orders / Video Player, and create one sprite.

  • 👀 Be sure that the SVG doesn’t exist in Toolkit already
  • 🤷‍♀️ Determine if the SVG is implementation-specific or generic (Check with #global-experience if unsure.)
  • 🏃‍♀️ With webpack running, add the SVG to the correct directory
    • ↳ Dashboard: assets/images/svgs/
    • ↳ Video Player: assets/images/video-player/svgs/

Naming matters

The filename will affect the appearance of your SVG. Why? Because the <use> is using the Shadow DOM, we don’t have a ton of control over targeting styles. So, we rely on the name to auto-generate the <svg>’s ID. The default is the monochromatic stroke that relies on currentColor to inherit the color from the <svg>.

Filename Output Use case
icon-whatever.svg Inherits parent’s text color (currentColor) Monochromatic icons. Most common.
icon-whatever--filled.svg Doesn’t set a stoke color Selected state (rating stars / hearts)
icon-whatever--color.svg Retains the stroke / fill of original SVG Complex illustrations.

Icon Library

alert
arrow
apps
audience
branding
calendar-slots
calendar-check
calendar
checkmark
checkmark-circle
checkmark-circle--filled
click
cloud-upload
collapse
cross-circle
cross-circle--filled
delete
discover
download
draggable
dropdown
email
engage
error
expand
external-link
eye
filters
folder
frustration
gizmo
heart--filled
heart--stroke
home
idea
info
info--filled
link
lock
mobile
move
notifications
options
pages
pages--unique
prototype
question-mark-circle--filled
quick-test
record
report
search
send
settings
share
slack
star
star--filled
star-multi
star-multi--filled
stopwatch
test-creative
test-plan
test-messaging
thumbs-up
unmoderated
video-upload
workspace-wrench
usability
user-settings
warning
websites
share-screen

Media Icons

clip
forward-5
fullscreen
highlight-reel
note
play
pause
rewind-5
replay
rotate
volume--high
volume--low
volume--med
volume--off

Logo Icons

Icon Example

<tk-icon name="email" size="xs"></tk-icon>
<tk-icon name="email" size="small"></tk-icon>
<tk-icon name="email" size="medium"></tk-icon>
<tk-icon name="email" size="large"></tk-icon>
<tk-icon name="email" size="large" muted></tk-icon>

Description

We use an SVG symbol to deliver our icons. The SVG sprite acts like a collection of stamps that can be repeated with different ink (colors). All of our icons should be monochromatic.

Logo Example

<svg class="logo logo--large" role="presentation">
  <use xlink:href="#logo-usertesting"></use>
</svg>

Stamp

<tk-stamp icon="send" size="xs"></tk-stamp>
<tk-stamp icon="send" size="small"></tk-stamp>
<tk-stamp icon="send" size="medium"></tk-stamp>
<tk-stamp icon="send" size="large"></tk-stamp>

Description

Stamps are used to help visually break up blocks of information. They should be used sparingly and intentionally.

Different sized stamps are used to introduce new content. Small is the default. The xs size is used next to bullet points. medium is used for larger pieces of content with CTAs and/or links. large is used to introduce the page’s content.

Primary

<tk-stamp icon="send" size="xs" color="primary"></tk-stamp>
<tk-stamp icon="send" size="small" color="primary"></tk-stamp>
<tk-stamp icon="send" size="medium" color="primary"></tk-stamp>
<tk-stamp icon="send" size="large" color="primary"></tk-stamp>

Description

Primary stamps are more prominent than the default.

Insight

<tk-stamp icon="send" size="xs" color="insight"></tk-stamp>
<tk-stamp icon="send" size="small" color="insight"></tk-stamp>
<tk-stamp icon="send" size="medium" color="insight"></tk-stamp>
<tk-stamp icon="send" size="large" color="insight"></tk-stamp>

Description

Insight stamps are used on Quick Insights.

Do

  • Group similar sized stamps

Don't

  • Mix and match stamp colors
  • Have more than one large on a page

Accessibility

  • Icons that provide information or are directly tied to an action should receive :focus and have an appropriate aria-label.
  • Icons which are for visual purposes only should have a role="presentation" to prevent screen readers from seeing it.