Ein Loading-Indicator zeigt an, dass eine Aktion oder ein Prozess im Hintergrund ausgeführt wird und Nutzende auf die Beendigung dieses Prozessess warten müssen.

| Nummer | Typ | Beschreibung | Optional | Hinweis |
|---|---|---|---|---|
| 1 | Animation | Nein | Verfügbar in "Red", "Smoke" und "White". Geeignet für Overlay-Einsatz |
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.
Use the indicator only for actions lasting at least about 1 second. Shorter processes tend to be confusing due to the flashing.
A brief minimum display duration (guideline: about 500 ms) may be useful afterward, but it is not required, depending on what happens next.
If possible, offer a progress indicator to give users an idea of the remaining waiting time, especially for long waiting times (approx. 10 seconds or more).
It's possible to define the size of the component, choosing between s (default), l, xl, xxl, and xxxl.
<sbb-loading-indicator size="l"></sbb-loading-indicator>
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 size="l" aria-label="Loading, please wait"></sbb-loading-indicator>
</div>
SbbLoadingIndicatorElement, sbb-loading-indicator.| Name | Attribute | Privacy | Type | Default | Description |
|---|---|---|---|---|---|
color | color | public | 'default' | 'smoke' | 'white' | 'default' | Color variant. |
size | size | public | 's' | 'l' | 'xl' | 'xxl' | 'xxxl' | 's' | Size variant, either s or m. |