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

Banners

When considering the use of a banner, it's best to evaluate the level of the message first. Content within banners must be important or require action taken by the customer.

Types

Information: This banner is used to provide general information. Learn more Tip: This banner is used to guide users through the experience. Learn more Warning: This banner is used to communicate an impending, non-blocking issue. Learn more Error: This banner is used to communicate a blocking change that needs to be remedied before a user can proceed. Learn more Success: This banner is used to communicate a positive or confirming action. Learn more
Expand Copy
<tk-banner>
  Information: This banner is used to provide general information. <a class="t-link" href="#">Learn more</a>
</tk-banner>
<tk-banner type="tip">
  Tip: This banner is used to guide users through the experience. <a class="t-link" href="#">Learn more</a>
</tk-banner>
<tk-banner type="warning">
  Warning: This banner is used to communicate an impending, non-blocking issue. <a class="t-link" href="#">Learn more</a>
</tk-banner>
<tk-banner type="error">
  Error: This banner is used to communicate a blocking change that needs to be remedied before a user can proceed. <a class="t-link" href="#">Learn more</a>
</tk-banner>
<tk-banner type="success">
  Success: This banner is used to communicate a positive or confirming action. <a class="t-link" href="#">Learn more</a>
</tk-banner>

Description

Banners communicate varying levels of content such as information, warnings, errors, and success.

Multi-line Banner

Olivander's Wand Shop

1 Holly and Phoenix feather wand. Buy it now.

1 Yew and Phoenix feather wand. Buy it now.

Expand Copy
<tk-banner>
  <h2 class="t-medium mb-1x">Olivander's Wand Shop</h2>
  <p class="mb-0x">1 Holly and Phoenix feather wand. <a class="t-link" href="#">Buy it now.</a></p>
  <p class="mb-0x">1 Yew and Phoenix feather wand. <a class="t-link" href="#">Buy it now.</a></p>
</tk-banner>

Offline Banner

Show Example The restricted section of the library is forbidden to all students at Hogwarts.
Expand Copy
<tk-button
  onClick="toggleBanner(event.target)"
  type="ghost"
>
  Show Example
</tk-button>

<tk-banner type="error" offline is-hidden>
  The restricted section of the library is forbidden to all students at Hogwarts.
</tk-banner>

Description

Offline: This banner extends the full width of the browser to draw attenton. This banner is used for network failure.

Sticky Banner

Gillyweed: A nifty water plant that allows the person who eats it to breathe underwater.
Expand Copy
<div style="height: 400px">
  <tk-banner sticky>
    Gillyweed: A nifty water plant that allows the person who eats it to breathe underwater.
  </tk-banner>
</div>

Description

Sticky: This banner is used to provide context that may extend the viewable window.

Usage

Do

  • Use offline banners for network failure issues

Don't

  • Use multiple sticky banners in a container

Link Banner

Pre-order a copy of Gilderoy Lockhart's most celebrated book, Magical Me.
Expand Copy
<tk-banner>
  Pre-order a copy of Gilderoy Lockhart's most celebrated book, <a class="t-link" href="#">Magical Me</a>.
</tk-banner>

Description

Link: Banners with links provide additional context to the notification. This ensures banners remain concise. Links should navigate to other pages.

Need stocking stuffers? Check out Gilderoy Lockhart's thrilling adventure, .
Expand Copy
<tk-banner>
  Need stocking stuffers? Check out Gilderoy Lockhart's thrilling adventure, <button class="btn--link" type="button">Year with the Yeti</button>.
</tk-banner>

Description

Button Link: Banners with button links connect specifc actions to banners. Commonly this pattern is used to launch modals from banners.

Usage

Do

  • Use links for banners that need to link to other pages
  • Use button links for banners that need to link to specific actions

Don't

  • Use many links within a banner

Closeable Banner

Expand Copy
<tk-banner id="banner" closeable onClose="showToggler(event.target)">
  This is the <strong>default</strong> banner
  with a <strong>close</strong> button.
</tk-banner>
<tk-button class="hidden"
  onClick="showBanner(event.target)"
  type="ghost"
>
  Show banner again?
</tk-button>

<script>
  const banner = document.getElementById('banner'); // Safari
  banner.addEventListener('close', (e) => showToggler(e.target)); // Safari

  const showBanner = (element) => {
    const banner = element.previousElementSibling;
    banner.removeAttribute('is-hidden');
    element.classList.add('hidden');
  };

  const showToggler = (element) => {
    const button = element.nextElementSibling;
    button.classList.remove('hidden');
  };
</script>

Description

Closeable: When possible add the ability to close a banner to allow the customer to be in control of their workplace. In the example above, the banner is listening for the close event to be emitted. Then it calls the showToggler method.

Because Safari doesn’t yet support GlobalEventHandlers.onclose, you’ll need to add the event listener if using the component in plain HTML. This is not necessary in Angular since (close) can just be used as an output.

tk-banner

Properties

Property Attribute Description Type Default
closeable closeable Adds a close button to hide the banner. boolean false
isHidden is-hidden Sets the visibility of the banner. Useful if you want to hide the banner until an action is completed. boolean false
offline offline Extends full-width of the browser and uses our error-state palette to draw attention. Used for network failure. boolean false
sticky sticky Pins the banner to the top of its container. boolean false
type type Changes the appearance of the banner to convey severity of information. "error" | "info" | "success" | "tip" | "warning" 'info'

Events

Event Description Type
close CustomEvent<any>

Usage

Do

  • Use closeable banner for content that can be dismissed

Don't

  • Add too many actions to closeable banners