Spinner

A loading spinner is used for indicating a loading state of a page or section. It is colored according to the currently applying font color.

Classes

Class Applied to Description
N/A .s-spinner Base loading style that is used almost universally
.s-spinner .s-spinner__xs An extra small loading style for compact layouts
.s-spinner .s-spinner__sm A small style for compact layouts
.s-spinner .s-spinner__md A medium style for larger layouts
.s-spinner .s-spinner__lg A small style for the largest layouts

Examples

The spinner’s colors are based on the font color of the element, which will usually be inherited from its parent. If you need to apply a color override, the font color classes can provide themability. In most situations, a black and white spinner based on the default font color will be appropriate.

For accessibility, it’s important to add fallback loading text that is visible to screen readers. Additionally, you should add aria-busy="true" to the component that triggered the loading state while the spinner is shown.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<div class="s-spinner s-spinner__xs">
    <div class="v-visible-sr">Loading…</div>
</div>
<div class="s-spinner s-spinner__sm">
    <div class="v-visible-sr">Loading…</div>
</div>
<div class="s-spinner">
    <div class="v-visible-sr">Loading…</div>
</div>
<div class="s-spinner s-spinner__md">
    <div class="v-visible-sr">Loading…</div>
</div>
<div class="s-spinner s-spinner__lg fc-orange-400">
    <div class="v-visible-sr">Loading…</div>
</div>
Loading…
Loading…
Loading…
Loading…
Loading…