Skip to content

Theme

Feedback

Learn how to show alerts, status labels, badges, progress and loading states.

Inline Alerts

An inline alert shows a message about the content next to it: a warning before an action, a note, an error, or a confirmation. Add .alert and a type class (.alert-warning, .alert-info, .alert-danger, .alert-success) to a flex container with an icon and a <span>. The type class colors the border, background, icon and text.

Warning: You must reassign existing pages in this category to another category.
Note: You must reassign existing pages in this category to another category.
Error: You must reassign existing pages in this category to another category.
Success: You’re all good!
View codeHide code
<div class="alert alert-warning d-flex align-items-center">
  <svg class="icon" aria-hidden="true"><use href="#common-warning"/></svg>
  <span>Warning: You must reassign existing pages in this category to another category.</span>
</div>

Small

Add .alert-sm for a smaller alert with 8px padding, a 16px icon and small text, e.g. inside a form or a card.

Warning: You must reassign existing pages in this category to another category.
Note: You must reassign existing pages in this category to another category.
Error: You must reassign existing pages in this category to another category.
Success: You’re all good!
View codeHide code
<div class="alert alert-sm alert-info d-flex align-items-center">
  <svg class="icon" aria-hidden="true"><use href="#common-info-outline"/></svg>
  <span>Note: You must reassign existing pages in this category to another category.</span>
</div>

Status Labels

A status label shows a short status of an item, usually one or two words: positive (Approved), negative or error (Rejected), warning (Expires Soon), info (Public), or neutral (Pending, Admin). It only displays a status: don't use it as a button or a link.

Use .badge-pill with a color class: .badge-pill-success, .badge-pill-danger, .badge-pill-warning or .badge-pill-info. Without a color class the label is quiet; add .text-base for a neutral label with darker text.

Labels are small by default; add .text-md for the medium size. A label can have any icon before the text: .size-14 in small labels, .size-16 in medium ones.

VariantSmallMedium (.text-md)
Positive.badge-pill .badge-pill-success
ApprovedActive
ApprovedActive
Negative/Error.badge-pill .badge-pill-danger
RejectedDeleted
RejectedDeleted
Warning.badge-pill .badge-pill-warning
Expires SoonNot Saved
Expires SoonNot Saved
Info.badge-pill .badge-pill-info
PublicUpdated
PublicUpdated
Quiet.badge-pill
Pendingv1.0.0
Pendingv1.0.0
Neutral.badge-pill .text-base
PrivateAdmin
PrivateAdmin
View codeHide code
<span class="badge-pill badge-pill-success">
  <svg class="icon size-14" aria-hidden="true"><use href="#common-check-circle"/></svg>
  <span>Approved</span>
</span>
<span class="badge-pill badge-pill-danger text-md">
  <svg class="icon size-16" aria-hidden="true"><use href="#internal-close-circle-outline"/></svg>
  <span>Rejected</span>
</span>
<span class="badge-pill text-base ba-0"><span>Admin</span></span>

Without a Border

Add .ba-0 to remove the border, e.g. when labels sit on a colored or busy background.

VariantSmallMedium (.text-md)
Positive.badge-pill .badge-pill-success .ba-0
ApprovedActive
ApprovedActive
Negative/Error.badge-pill .badge-pill-danger .ba-0
RejectedDeleted
RejectedDeleted
Warning.badge-pill .badge-pill-warning .ba-0
Expires SoonNot Saved
Expires SoonNot Saved
Info.badge-pill .badge-pill-info .ba-0
PublicUpdated
PublicUpdated
Quiet.badge-pill .ba-0
Pendingv1.0.0
Pendingv1.0.0
Neutral.badge-pill .text-base .ba-0
PrivateAdmin
PrivateAdmin

Badges

A badge shows the number of new or unread items, in or next to the element they belong to: a menu item, a tab, or on top of a button. Use it only with a number or the “NEW” label. To show a status, use a status label instead.

Use .badge.badge-bg-brand: the background comes from the theme's Badge color and the text is always white. Add .badge-sm for the small size.

Default

12NEW

Small (.badge-sm)

12NEW

In a button

In a tab

View codeHide code
<!-- Default -->
<span class="badge badge-bg-brand">12</span>

<!-- Small -->
<span class="badge badge-sm badge-bg-brand">12</span>

<!-- On a button: the badge sits on the top-right corner -->
<button type="button" class="btn sm secondary pos-rel">
  <span>Approvals</span>
  <span class="badge badge-sm badge-bg-brand pos-abs" style="top: -8px; right: -8px;">3</span>
</button>

<!-- In a tab -->
<div class="tabs bb" role="tablist" aria-label="Messages">
  <button type="button" class="tab-item active" role="tab" aria-selected="true"><span>Inbox</span><span class="badge badge-sm badge-bg-brand ml-8">12</span></button>
  <button type="button" class="tab-item" role="tab" aria-selected="false" tabindex="-1"><span>Sent</span></button>
</div>

Progress Bar

A progress bar shows how much of something is done or used, e.g. the share of a budget spent. It's built with utility classes: the track is .bg-n2.circle.overflow-hidden with a 4px height, and the fill is .bg-primary.circle.h-100.transition-base. Set the fill's width to the percentage; it animates when the width changes.

Give the track role="progressbar" with the current value, and a label: visible text above the bar linked with aria-labelledby, or an aria-label. To change the height, set it on the track; to change the colors, use other .bg-* classes, e.g. .bg-yellow on the fill for a budget that is almost used up.

Budget used: 75%
View codeHide code
<div class="bg-n2 circle overflow-hidden" style="height: 4px;" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" aria-label="Progress">
  <div class="bg-primary circle h-100 transition-base" style="width: 60%;"></div>
</div>

Loader

A loader shows that content is loading: an animated circle in the theme's loader color (--loader-color). Put the SVG in a .loader container with role="status" and an aria-label.

Set the size with a size class on the SVG: .size-24 by default, .size-16 or .size-12 in small places such as buttons and labels.

.size-24
.size-16
.size-12
View codeHide code
<div class="loader d-flex" role="status" aria-label="Loading">
  <svg class="size-24" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
    <g>
      <animateTransform attributeName="transform" type="rotate" values="0 33 33;270 33 33" begin="0s" dur="1.4s" fill="freeze" repeatCount="indefinite"/>
      <circle fill="none" stroke-width="11%" stroke-linecap="round" cx="33" cy="33" r="30" stroke-dasharray="187" stroke-dashoffset="610">
        <animateTransform attributeName="transform" type="rotate" values="0 33 33;135 33 33;450 33 33" begin="0s" dur="1.4s" fill="freeze" repeatCount="indefinite"/>
        <animate attributeName="stroke-dashoffset" values="187;46.75;187" begin="0s" dur="1.4s" fill="freeze" repeatCount="indefinite"/>
      </circle>
    </g>
  </svg>
</div>

Overlay

To cover a container while its content loads, put the loader in .overlay > .overlay-inner. The overlay fills the container with a semi-transparent layer and centers the loader. Give the container .pos-rel and .overflow-hidden, so the overlay follows its rounded corners.

Upcoming events

The content under the overlay stays visible but can't be used while it loads.

View codeHide code
<div class="card pa-24 pos-rel overflow-hidden">
  …card content…
  <div class="overlay">
    <div class="overlay-inner">
      <div class="loader" role="status" aria-label="Loading">
        <svg …the same SVG…></svg>
      </div>
    </div>
  </div>
</div>