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

Tooltips

Tooltips provide contextual information about a particular element.


Tooltips should be as concise as possible. For larger amounts of content, use Popovers instead.

Position

Top (Default) Tooltip on the top Right Tooltip on the right Left Tooltip on the left Bottom Tooltip on the bottom Top Left Tooltip on the top-left Bottom Left Tooltip on the bottom-left Top Right Tooltip on the top-right Bottom Right Tooltip on the bottom-right
Expand Copy
<tk-button class="l-inline-block">Top (Default)</tk-button>
<tk-tooltip>Tooltip on the top</tk-tooltip>

<tk-button class="l-inline-block">Right</tk-button>
<tk-tooltip position="right">Tooltip on the right</tk-tooltip>

<tk-button class="l-inline-block">Left</tk-button>
<tk-tooltip position="left">Tooltip on the left</tk-tooltip>

<tk-button class="l-inline-block">Bottom</tk-button>
<tk-tooltip position="bottom">Tooltip on the bottom</tk-tooltip>

<tk-button class="l-inline-block">Top Left</tk-button>
<tk-tooltip position="top-left">Tooltip on the top-left</tk-tooltip>

<tk-button class="l-inline-block">Bottom Left</tk-button>
<tk-tooltip position="bottom-left">Tooltip on the bottom-left</tk-tooltip>

<tk-button class="l-inline-block">Top Right</tk-button>
<tk-tooltip position="top-right">Tooltip on the top-right</tk-tooltip>

<tk-button class="l-inline-block">Bottom Right</tk-button>
<tk-tooltip position="bottom-right">Tooltip on the bottom-right</tk-tooltip>

Size

Small (Default) The small size should be good for most of your tooltip needs.
Medium The max width for the medium size tooltip is about twice the max width of the small size.
Large This is the large size tooltip. Although you may be itching to try it out, please refrain from using this size. It looks a little out of place, and the design team would probably not approve.
Expand Copy
<div class="mb-3x">
  <tk-button class="l-inline-block">Small (Default)</tk-button>
  <tk-tooltip>
    The small size should be good for most of your tooltip needs.
  </tk-tooltip>
</div>

<div class="mb-3x">
  <tk-button class="l-inline-block">Medium</tk-button>
  <tk-tooltip size="medium">
    The max width for the medium size tooltip is about twice the max width of the small size.
  </tk-tooltip>
</div>

<div>
  <tk-button class="l-inline-block">Large</tk-button>
  <tk-tooltip size="large">
    This is the large size tooltip. Although you may be itching to try it out, please refrain from using this size. It looks a little out of place, and the design team would probably not approve.
  </tk-tooltip>
</div>

Wrapped / Not Wrapped

Wrapped (Default) This tooltip shows what a link looks like when the text is wrapped. Here's my link, harryjamespotter@hogwartsschool.com
Not Wrapped This tooltip shows what a link looks like when no-wrap is set to true. Here's my link, harryjamespotter@hogwartsschool.com
Expand Copy
<div class="mb-3x">
  <tk-button class="l-inline-block">Wrapped (Default)</tk-button>
  <tk-tooltip>
    This tooltip shows what a link looks like when the text is wrapped. Here's my link, <a href="#" class="tooltip__link">harryjamespotter@hogwartsschool.com</a>
  </tk-tooltip>
</div>

<div>
  <tk-button class="l-inline-block">Not Wrapped</tk-button>
  <tk-tooltip no-wrap="true">
    This tooltip shows what a link looks like when no-wrap is set to true. Here's my link, <a href="#" class="tooltip__link">harryjamespotter@hogwartsschool.com</a>
  </tk-tooltip>
</div>

Enabled / Disabled

Enabled (Default) Since the enable attribute is set to true by default, you can remove it.
Disabled This tooltip should never appear because it is disabled.
Expand Copy
<div class="mb-3x">
  <tk-button class="l-inline-block">Enabled (Default)</tk-button>
  <tk-tooltip enable="true">
    Since the enable attribute is set to true by default, you can remove it.
  </tk-tooltip>
</div>

<div>
  <tk-button class="l-inline-block" status="disabled">Disabled</tk-button>
  <tk-tooltip enable="false">
    This tooltip should never appear because it is disabled.
  </tk-tooltip>
</div>

Visible (Initially)

Visible This tooltip is visible after initializing or refreshing the page. It acts as a normal tooltip after the mouse moves over the button or tooltip.
Expand Copy
<tk-button class="l-inline-block">Visible</tk-button>
<tk-tooltip visible="true" position="right">
  This tooltip is visible after initializing or refreshing the page. It acts as a normal tooltip after the mouse moves over the button or tooltip.
</tk-tooltip>

Dropdown Items (With Delay)

Tooltip on item #1 Tooltip on item #2
Expand Copy
<tk-dropdown full-height="true" trigger-text="My Items">
  <tk-dropdown-item>
    <button class="dropdown__link" type="button">
      Special Item #1
    </button>
    <tk-tooltip position="left">Tooltip on item #1</tk-tooltip>
  </tk-dropdown-item>
  <tk-dropdown-item>
    <button class="dropdown__link" type="button">
      Special Item #2
    </button>
    <tk-tooltip position="left">Tooltip on item #2</tk-tooltip>
  </tk-dropdown-item>
</tk-dropdown>

Description

For the tooltip to work with a dropdown item, add full-height="true" to the tk-dropdown component as shown above.

Dropdown Items (No Delay)

Tooltip on item #1 Tooltip on item #2
Expand Copy
<tk-dropdown full-height="true" trigger-text="My Items">
  <tk-dropdown-item>
    <button class="dropdown__link" type="button">
      Special Item #1
    </button>
    <tk-tooltip position="left" delay="false">
      Tooltip on item #1
    </tk-tooltip>
  </tk-dropdown-item>
  <tk-dropdown-item>
    <button class="dropdown__link" type="button">
      Special Item #2
    </button>
    <tk-tooltip position="left" delay="false">
      Tooltip on item #2
    </tk-tooltip>
  </tk-dropdown-item>
</tk-dropdown>

Description

Add delay=false" to the tooltip to remove the delay time between its hidden and visible states. As stated in the previous example, for the tooltip to work with a dropdown item, add full-height="true" to the tk-dropdown component.

Usage

Do

  • Limit the amount of copy in a tooltip
  • Pair tooltips with appropriate icons

Don't

  • Overuse tooltips within a component

Theming

This component will receive a different set of styles based on the active --tk-theme CSS property. To receive theme styling: set :root { --tk-theme: userTestingTheme } in your main CSS file.

Accessibility

  • The tooltip component includes the attribute role="tooltip" and automatically adds aria-describedby to the previous sibling element which is the trigger element for the tooltip.