Base

  • Colors
  • Icons
  • Logos
  • Spacing
  • Typography

Components

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

Form

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

Layout

  • Containers
  • Layers
  • Layout
  • Split Layout
  • Wrappers

Navigation

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

Overlay

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

Patterns

  • Full Page Message

Usertesting-next

  • Cards
  • Colors
  • Segmented Controls
  • Shadows and Elevations
  • Spacing
  • Typography

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">#clickable-tag</tk-tag>
<tk-tag type="button">
  <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.

Action removeable

Removeable Removeable Removeable
Copy
<tk-tag size="small" is-removeable aria-label="Remove this tag">
  Removeable
</tk-tag>
<tk-tag size="medium" is-removeable aria-label="Remove this tag">
  Removeable
</tk-tag>
<tk-tag size="medium" is-removeable aria-label="Remove this tag">
  <tk-icon name="info" class="mr-1x"></tk-icon> Removeable
</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

Green Red Purple Yellow Cyan Teal Pink Orange Grey
Expand Copy
<div>
  <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" | "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

Theming

This component will receive a different set of styles based on the active --tk-theme CSS property. To receive theme styling: make sure to set the desired value for this property inside of the :root selector.

These styles are not ready for production, so they cannot be used in Orders