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

Buttons

Buttons are useful to draw attention to a goal or action. Calls to actions within buttons should be explicit.

For information about how to write button copy, check out the typography page.

Playground 👩🏽‍🔬

Send
Alignment
Size

Used only when there is a need to conserve space.

This size is only for the merged platform and is not production ready.


Width
Status
Type

Contained buttons have more emphasis, as they use a primary colour fill. A layout and/or container should contain a single prominent button that makes it clear that other buttons have less importance in the hierarchy. This high-emphasis button commands the most attention.

Use contained buttons for high prioritized interactions as they should guide the user. Use only as stand-alone or in combination with outline or ghost buttons. Use sparingly, as overuse can cause confusion to a user.

Outlined buttons are used for more emphasis than text buttons due to the stroke. Outline buttons are intended for general use buttons and actions like triggering popouts, filtering and sharing actions, when a number of buttons have the same priority but none of them are more important than the others.

This is typically the most appropriate button type because of its neutral visual weight. Also use outline buttons for low prioritized interactions that need to be available for the user (e.g. Back, Cancel). Use only in combination with primary or highlight buttons.

Ghost buttons have the same spacing and alignment rules as other buttons, however they are the most minimal visually. This allows them to be used alongside buttons when a low priority action is required, the element is placed alongside buttons, or when a tap target area should be considered.

Ghost buttons are typically used for less important actions. Use ghost buttons for very low prioritized interactions as they draw little attention from the user. Use only in combination with other ghost buttons or primary buttons. Note: Ghost buttons are meant to be used for interactions, they are not links.

The outline dark button should only be paired with the background of the same hue.

This is typically the most appropriate button type because of its neutral visual weight on dark backgrounds. Also use outline dark buttons for low prioritized interactions that need to be available for the user (e.g. Back, Cancel). Use only in combination with outline buttons.


Variant

When a user attempts a potentially destructive action we use red to warn them of the potential risk involved with completing such an action.


Defaults

Example
Copy
  <tk-button
    alignment="center"
    size="standard"
    status="ready"
    type="contained"
    variant="standard"
  >
    Example
  </tk-button>

Usage

Do

  • Limit the number of contained buttons per page
  • Keep content within buttons clear, concise, actionable and no longer than 40 characters
  • Group like-sized buttons

Don't

  • Wrap TkButton in an <a> or <button>
  • Use contained and destructive buttons together
  • Write button text that is greater than 40 characters
  • Use other colors for button link
  • Put default buttons next to compact buttons

Submit

Submit
Copy
  <form action="http://www.google.com" id="formId">
    <tk-button
      action-type="submit"
      form="formId">
      Submit
    </tk-button>
  </form>

Text + Icon

Locked feature
10:03
Expand Copy
<tk-button type="outline">
  Locked feature
  <tk-icon class="ml-2x" name="lock" size="small"></tk-icon>
</tk-button>
<hr class="horizontal-rule" />
<tk-button
  type="outline"
>
  <tk-icon class="mr-2x" name="play" size="small"></tk-icon>
  10:03
</tk-button>

Description

Occasionally, an icon helps provide necessary context to an action. For example, we use a lock icon to visibly communicate to a customer that a feature or flow is unavailable.

For video play buttons that utilize preview images, use the tk-poster-play component that can be found here.

Icon only

Expand Copy
  <tk-icon-button>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

Description

Please use the TkIconButton component for this. Full reference here.

Usage

Do

  • Ensure the action of the button matches the icon of the button
  • Ensure buttons with locks are clickable
  • Place locks after a string of text.
  • Set the status Prop to disabled when applicable.
  • Only show locks when the feature or flow relevant to the user is blocked.

Don't

  • Add lock icons without context
  • Add more than one lock to a button
  • Use icons for complex actions

Inverse

Copy
<button class="btn--inverse mb-2x">Button inverse</button>
<button class="btn--inverse active">Button inverse</button>

Description

This style of button is used as a toggle to select one or more options. Button Inverse should always have a .input--hidden:checked + .btn--inverse applied to one of the options. For buttons that require more text, use .btn--multiline with this class.

Stacking utils

Contained Outline Ghost
Copy
<div class="l-flex l-flex-wrap">
  <tk-button class="mb-2x btn-md-block mr-lg-1x">Contained</tk-button>
  <tk-button class="mb-2x btn-md-block mr-lg-1x" type="outline">Outline</tk-button>
  <tk-button class="mb-2x btn-md-block" type="ghost">Ghost</tk-button>
</div>

Description

For times when buttons are next to each other on larger screens, but need to stack at smaller screens, we have classes to stack them. Use btn-md-block for screens stacking at medium screensizes and use btn-sm-block for stacking at small screensizes.

Group

Cancel Send
Copy
<div class="btn-group">
  <tk-button class="mr-2x" type="outline">Cancel</tk-button>
  <tk-button>Send</tk-button>
</div>

Description

When two or more buttons need to be next to each other. Commonly used in modals.

Usage

Do

  • Have clear actions for grouped buttons

Don't

  • Use three or more buttons in a group without a good reason

Accessibility

  • Receives :focus

  • Buttons without content or a name should have aria-label such as icons.

Usage

Do

  • Ensure one Radio Button Group item is selected
  • Provide clear copy with each radio selection

Don't

  • Allow more than one radio button group to be selected at a time

Accessibility

  • Receives :focus

  • Groups of radio buttons should share the same :name