Loader
Usage
Loader is an indeterminate loading indicator shown while content, a card, or a control is waiting for async work to finish. Use it when the loading duration is uncertain and a simple busy indicator is enough, in places where users should stay in context instead of being redirected to a separate loading screen.
import { MtLoader } from "@shopware-ag/meteor-component-library";
Examples
With text
API reference
Props
| Prop | Type | Default |
|---|---|---|
size | `${string}px` | "50px" |
title | string | |
description | string | |
backdrop | boolean | true |
Best practices
Do
- Keep the loading state brief and replace it with real content as soon as possible.
- Use a size that fits the surrounding surface, such as a compact loader inside controls and a larger loader in content areas.
- Use
titleanddescriptionwhen users need short context for what is loading. - Pair Loader with disabled or blocked interactions when the underlying surface should not be used while loading.
- Place it inside a bounded surface that provides the context for what is loading.
Don't
- Do not use Loader when you can show real progress with a percentage or completed amount.
- Do not leave Loader visible for long-running tasks without additional context or feedback.
- Do not use it as the only way to explain what is happening when the wait may take noticeable time.
Behavior
- Loader is an indeterminate indicator. It does not expose a value or completion state.
- The component centers itself and renders as an absolute overlay with a semi-transparent background, so it works best inside the surface that is being loaded.
sizeaccepts pixel values such as16px,32px, or48px, and the ring thickness adapts to the provided size.backdropcontrols whether Loader renders its backdrop background and defaults totrue.titleanddescriptionrender below the spinner as centered body text and can be used independently.
Accessibility
- Loader is visual only and does not announce loading state to assistive technologies on its own.
titleanddescriptionprovide visible context, but the surrounding region should still expose an appropriate busy state when the loading state matters for screen-reader users.- If loading blocks interaction, also disable or otherwise guard the affected controls so keyboard users are not left guessing what is available.
Related components
- Progress Bar: when you can communicate meaningful progress such as processed items, uploaded bytes, or percentage complete.