Zur Navigation Zum Inhalt Kontakt Menu Find component Overview Lyne Principles Foundation Accessibility Design System Guidelines Deutsch Français Italiano English Our design principles User-centred Recognisable Inclusive Reduced Holistic Self-explanatory Task-oriented Appropriate SBB Brand portal Logo Digital clock Rights of use Base colors Functional colors Off brand colors Icons Timetable icons Pictograms About accessibility Über diesen Guide Contact Further information Product Owner User Research Interaction Design Visual Design Development Content Design Testing What is a design system? Designing Coding FAQ Help Process Contribution Contact Overview Base Components Overview Releases Design Tokens Komponenten Overview Base Informationen Overview Base Components Sense & Purpose Community Assets Instructions Power-Apps Digital banner ads SAP Design Guidelines App Icons Loading-Indicator Info

What does the component do?

A loading indicator shows that an action or process is running in the background and users have to wait for this process to finish.

When should the component be used?

  • To inform users that an action or process is running in the background.
  • To cover waiting times.
  • To give feedback that the application is responding to user input.

Rules

  • Only use the loading indicator for actions that last longer than a short moment.
  • Make sure that the loading indicator does not interfere with the layout of the page or application.
  • If possible, offer a progress indicator to give users an idea of the remaining waiting time, especially for long waiting times.
Anatomy
Anatomy of the component
Number Type Description Optional Info
1 Animation Variante windwow No Verfügbar in "Red", "Smoke" und "White". Geeignet für Overlay-Einsatz
2 Animation Variante circle No Verfügbar in "Red", "Smoke" und "White". Geeignet für Inline-Einsatz
Demo

Playground

Variants Window Circle Sizes Small Large Color Default Smoke White Background White Milk Iron Charcoal Black

Examples

Window Small Default
Window Small Smoke
Window Small White
Window Large Default
Window Large Smoke
Window Large White
Circle Default
Circle Smoke
Circle White
Accessibility
HTML-Markup kopiert.
Implementation

The sbb-loading-indicator is a component which can be used to indicate progress status
or an ongoing activity which require some time to complete.

Variants

The component has two different variants.

In window mode, the component completely covers the parent element, preventing interaction with it.

<sbb-loading-indicator variant="window"></sbb-loading-indicator>

While the circle mode can be used inline within another component (e.g. button);
in this case the component adjusts its size to the parent font size.

<sbb-button>
  <sbb-loading-indicator slot="icon" variant="circle"></sbb-loading-indicator>
  Click me
</sbb-button>

Style

In window mode it's possible to define the size of the component, choosing between s (default) and l.

<sbb-loading-indicator variant="window" size="l"></sbb-loading-indicator>

Accessibility

If the sbb-loading-indicator should be announced by screen-readers, use an element with the correct aria attributes
(aria-live set to polite or assertive, and possibly aria-atomic and aria-relevant)
and then append the sbb-loading-indicator on it after giving it the correct aria-label.

<div class="loader-container" aria-live="polite">
  <sbb-loading-indicator
    variant="window"
    size="l"
    aria-label="Loading, please wait"
  ></sbb-loading-indicator>
</div>

Properties

Name Attribute Privacy Type Default Description
color color public 'default' | 'smoke' | 'white' 'default' Color variant.
size size public 's' | 'l' 's' Size variant, either s or m.
variant variant public 'window' | 'circle' | undefined Variant of the loading indicator; circle is meant to be used inline, while window as overlay.
Imprint Contact Cookie settings