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

Badges

Badges help inform customers on the state of a study. They also communicate and indicate number-driven information.

Badges are white-space sensitive, so be sure to remove trailing spaces. Otherwise the badge can look lopsided.

Variants

content light content dark content 100 new notification info warning
Copy
<tk-badge>content</tk-badge>
<tk-badge type="light">light content</tk-badge>
<tk-badge type="dark">dark content</tk-badge>
<tk-badge type="muted">100</tk-badge>
<tk-badge type="success">new</tk-badge>
<tk-badge type="error">notification</tk-badge>
<tk-badge type="info">info</tk-badge>
<tk-badge type="warning">warning</tk-badge>

Description

Our primary badge provides focus and is used to convey top-level information like study count and limitations. Our muted badge is subtle and is used to convey supplementary information and attributes.

Numbered

1 Unaffected badge 2
1 2 Unaffected badge 3: content
Expand Copy
<div class="mb-3x">
  <tk-badge>1</tk-badge>
  <tk-badge>Unaffected badge</tk-badge>
  <tk-badge>2</tk-badge>
</div>
<div>
  <tk-badge>1</tk-badge>
  <tk-badge>2</tk-badge>
  <tk-badge type="muted">Unaffected badge</tk-badge>
  <tk-badge>3: content</tk-badge>
</div>

Description

Note: The numerated tk-badges must each contain their index that follows the placement of the badges. The only realistic use case for this is inside cards.

With Icon

Icon and text
Expand Copy
<tk-badge>
  <tk-icon class="mr-1x" name="info" size="small"></tk-icon>
  Icon and text
</tk-badge>

Description

Use the icon attribute to use icons in the badge

Size

Patronus Patronus Patronus Patronus
Copy
<tk-badge size="xxs">Patronus</tk-badge>
<tk-badge>Patronus</tk-badge>
<tk-badge size="medium">Patronus</tk-badge>
<tk-badge size="large">Patronus</tk-badge>

Description

Rarely should you need a badge size other than the default (small).

Stacking

Boggarts lavender robes, Hermione Granger Fantastic Beasts and Where to Find Them. Bee in your bonnet hand
Copy
<div class="demo-badge-group">
  <tk-badge size="medium" icon>
    <tk-icon class="mr-1x" name="light-bulb" size="small"></tk-icon>
    Boggarts lavender robes, Hermione Granger Fantastic Beasts and Where to Find Them.
  </tk-badge>
  <tk-badge type="dark" size="medium">
    Bee in your bonnet hand
  </tk-badge>
</div>

Description

📱 For badges with longer strings, the badges will break and wrap inline

Usage

Do

  • Place badges after content
  • Apply tooltips for more context

Don't

  • Add a lot of content to the badge, try to keep content below 24 characters
  • Include two badges next to each other unless absolutely necessary

Accessibility

  • Needs to have a minimum contrast ratio of 4.5