Spinner
Spinner is an animated indicator that represents an action in progress with no deterministic progress value.
While it is visible, the action is yet to be completed; on completion, the UI logic may opt to remove the component.
Using the Spinner
<App>
<Spinner />
</App><App>
<Spinner />
</App>
Spinnerignores thewidth,minWidth,maxWidth,height,minHeight, andmaxHeightproperties. If you want to change its size, use thesize-Spinnertheme variable (see details is the Styling section).
Behaviors
This component supports the following behaviors:
| Behavior | Properties |
|---|---|
| Animation | animation, animationOptions |
| Bookmark | bookmark, bookmarkLevel, bookmarkTitle, bookmarkOmitFromToc |
| Component Label | label, labelPosition, labelWidth, labelBreak, required, enabled, shrinkToLabel, style, readOnly |
| Tooltip | tooltip, tooltipMarkdown, tooltipOptions |
| Styling Variant | variant |
Properties
delay
default: 400
The delay in milliseconds before the spinner is displayed.
Use the buttons to toggle between the two Spinners.
<App>
<variable name="noDelay" value="{true}" />
<variable name="yesDelay" value="{false}" />
<HStack gap="$space-0_5">
<Button label="No delay" onClick="noDelay = true; yesDelay = false;" />
<Button label="1000 ms delay" onClick="noDelay = false; yesDelay = true;" />
</HStack>
<Spinner when="{noDelay}" delay="0" />
<Spinner when="{yesDelay}" delay="1000" />
</App><App>
<variable name="noDelay" value="{true}" />
<variable name="yesDelay" value="{false}" />
<HStack gap="$space-0_5">
<Button label="No delay" onClick="noDelay = true; yesDelay = false;" />
<Button label="1000 ms delay" onClick="noDelay = false; yesDelay = true;" />
</HStack>
<Spinner when="{noDelay}" delay="0" />
<Spinner when="{yesDelay}" delay="1000" />
</App>fullScreen
default: false
If set to true, the component will be rendered in a full screen container.
<App>
<Spinner fullScreen="true" />
</App><App>
<Spinner fullScreen="true" />
</App>Events
This component does not have any events.
Exposed Methods
This component does not expose any methods.
Parts
The component has some parts that can be styled through layout properties and theme variables separately:
ring: The animated ring element of the spinner.
Styling
Theme Variables
| Variable | Default Value (Light) | Default Value (Dark) |
|---|---|---|
| borderColor-Spinner | $color-surface-400 | $color-surface-400 |
| size-Spinner | 2.5em | 2.5em |
| thickness-Spinner | 0.125em | 0.125em |