Appearance
Appearance
import Loader from "@ui/Loader.vue"Loaders visually indicate when an operation is loading. This makes it visually clear that the user can't interact with the element until the loading process is complete.
To ensure the loader component remains accessible:
| Prop | Data type | Required? | Description |
|---|---|---|---|
container | Boolean | No | Whether to create a container for the loader |
NOTE
To avoid extended periods of distraction, the spinner animation stops after 4.9s.
Continuous movement is distracting for some users and not necessary to convey the ongoing loading state. A load time beyond 5s is very unlinkely and would usually indicate lost connection or an unhandled error. In either case, the user cannot expect to see results eventually, so the animated spinner would give a false impression.
<div style="width: 50%">
<Loader />
</div>By default the <fw-loader /> component creates a container that takes up 100% of its parent's height. You can disable this by passing a :container="false" property. The loader renders centered in the middle of the first parent that has position: relative set.
<div style="position: relative">
<div style="width: 50%">
<Loader :container="false" />
</div>
</div>