Base

  • Colors
  • Icons
  • Logos
  • Shadows and Elevations
  • Spacing
  • Typography

Components

  • Accordion
  • Avatars
  • Badges
  • Buttons
  • Cards
  • Character Counter
  • Device Type Icons
  • Draggables
  • Dropdowns
  • Droppables
  • Expandable image
  • Filters
  • Gallery card
  • Icon Button
  • Indicators
  • Lightbox image
  • Lists
  • Loading
  • Messages
  • Pictogram
  • Poster Play
  • Progress bar
  • QR Code
  • Rating stars
  • Row Selector
  • Segmented Controls
  • Sentiment
  • Split View
  • Tables
  • Tags
  • Tester vitals
  • Toggle button
  • Typeahead

Form

  • Checkbox
  • Combobox
  • Form Rule
  • Hint
  • Input
  • Input Title
  • Label
  • Multi-select List
  • Search
  • Select
  • Single-select List
  • Sliders
  • Switch
  • Text Area

Layout

  • Containers
  • Layers
  • Layout
  • Split Layout
  • Wrappers

Navigation

  • Context Switcher
  • Nav bar
  • Navigation
  • Pagination
  • Sidebar Navigation
  • Step Navigation
  • Tabs

Overlay

  • Banners
  • Bulk Selector
  • Modals
  • Popovers
  • Toast
  • Tooltips
  • User Notifications

Patterns

  • Full Page Message
  • Question card & Group Questions Container

Visualizations

  • Data Colors

Tags

Tags are compact elements that represent an input or attribute.

Sizes

#small-tag #medium-tag
Copy
<tk-tag size="small">#small-tag</tk-tag>
<tk-tag size="medium">#medium-tag</tk-tag>

Description

The default size is medium.

Action

#clickable-tag #clickable-tag #disabled-tag
Copy
<tk-tag type="button" color="blue">#clickable-tag</tk-tag>
<tk-tag type="button" color="blue">
  <tk-icon name="info" class="mr-1x"></tk-icon> #clickable-tag
</tk-tag>
<tk-tag type="button" is-disabled>#disabled-tag</tk-tag>

Description

Will render the tag as a button element instead of span. This pattern is used when a tag needs to be clickable, or not clickable.

The color attribute must be defined when a type has been set.

Action removeable

Removable Removable Removable
Copy
<tk-tag size="small" is-removeable aria-label="Remove this tag">
  Removable
</tk-tag>
<tk-tag size="medium" is-removeable aria-label="Remove this tag">
  Removable
</tk-tag>
<tk-tag size="medium" is-removeable aria-label="Remove this tag">
  <tk-icon name="info" class="mr-1x"></tk-icon> Removable
</tk-tag>

Description

This pattern is used when a tag needs to be removeable.

Group

#hello-world #πŸ’…πŸ½ #issa-tag #πŸ™…πŸ»β€
Copy
<div>
  <tk-tag>#hello-world</tk-tag>
  <tk-tag>#πŸ’…πŸ½</tk-tag>
  <tk-tag>#issa-tag</tk-tag>
  <tk-tag>#πŸ™…πŸ»β€</tk-tag>
</div>

Description

Useful for horizontally displaying a group of tags.

Typeahead

#My
Expand Copy
<tk-tag>#My</tk-tag>
<div class="typeahead">
  <div class="typeahead__results">
    <div class="typeahead__wrap">
      <ul class="typeahead__list">
        <li class="typeahead__item">
          <button type="button" class="typeahead__option">
            <strong>#my</strong>-tag-1
          </button>
        </li>
        <li class="typeahead__item">
          <button type="button" class="typeahead__option">
            <strong>#my</strong>-tag-2
          </button>
        </li>
        <li class="typeahead__item">
          <button type="button" class="typeahead__option">
            <strong>#my</strong>_tag_3
          </button>
        </li>
        <li class="typeahead__item">
          <button type="button" class="typeahead__option">
            <strong>#my</strong>tag4
          </button>
        </li>
      </ul>
    </div>
  </div>
</div>

Description

Supercharge the tag pattern by incorporating the Typeahead pattern. Customers can select from a dynamic list of tags matching the same characters.

Colored Tags

Dark Grey Green Red Purple Yellow Cyan Teal Pink Orange Grey
Expand Copy
<div>
  <tk-tag color="dark-grey" size="small">Dark Grey</tk-tag>
  <tk-tag color="green" size="small">Green</tk-tag>
  <tk-tag color="red" size="small">Red</tk-tag>
  <tk-tag color="purple" size="small">Purple</tk-tag>
  <tk-tag color="yellow" size="small">Yellow</tk-tag>
  <tk-tag color="cyan" size="small">Cyan</tk-tag>
  <tk-tag color="teal" size="small">Teal</tk-tag>
  <tk-tag color="pink" size="small">Pink</tk-tag>
  <tk-tag color="orange" size="small">Orange</tk-tag>
  <tk-tag color="grey" size="small">Grey</tk-tag>
</div>
</div>

Smart tags

Friction Positive Negative Other
Expand Copy
<div>
  <tk-tag type="smart" sentiment="friction" size="small">Friction</tk-tag>
  <tk-tag type="smart" sentiment="positive" size="small">Positive</tk-tag>
  <tk-tag type="smart" sentiment="negative" size="small">Negative</tk-tag>
  <tk-tag type="smart" sentiment="other" size="small">Other</tk-tag>
</div>

Description

Smart tags are used to convey friction, positive, negative, and other type sentiments. Smart tags are used in places such as the Video Player and the Single Study View Page.

Accessibility

  • Add an aria-label to the element to provide more context to the screen reader

tk-tag

Properties

Property Attribute Description Type Default
closeAriaLabel close-aria-label Customize the label read to screen readers for the close (x) button. string ${translate('tag_close')}
color color Renders the tag in a color variation to capture intent. Should only be passed in combination with a type="intent" prop. "aqua" | "blue" | "cyan" | "dark-grey" | "green" | "grey" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow" undefined
isDisabled is-disabled Use this to disable the interaction on a tag. Should only be passed in combination with a type="button" prop. boolean false
isRemoveable is-removeable Renders the tag with a close (“removeable”) button and applies the removeable variant styles. boolean false
sentiment sentiment For use in combination with a type="smart" prop. Renders the corresponding color for the chosen sentiment. "friction" | "negative" | "other" | "positive" undefined
size size Sets the size of the tag. "large" | "medium" | "small" | "xs" 'medium'
type type Sets the type of the tag. "button" | "intent" | "smart" undefined

Events

Event Description Type
close CustomEvent<void>

Methods

closeTag() => Promise<void>

Returns

Type: Promise<void>


Usage

Do

  • Use tag styling for user-generated data like: emails and words

Don't

  • Interchange tags and tabs