Loading spinner UI.
show#
Inserts an SVG spinner into the target element and returns the SVG node.
Parameters:
- target (
string) — scroll target selector or element - options (
object) — object with the keys below- size (
number) — SVG width/height in pixels (default24) - color (
string) — sets--rx-spinner-coloron the SVG - className (
string) — extra CSS class name(s) added to the SVG - position (
string) —'prepend'(default) or'append'inside the target
- size (
Returns: SVGElement|null
app.spinner.show(el, { size: 24 });
hide#
Removes the spinner mounted on the given target element.
Parameters:
- target (
string) — scroll target selector or element
app.spinner.hide(el);
hideAll#
Removes all spinners from every tracked mount target.
app.spinner.hideAll();
isActive#
Returns whether a spinner is currently mounted on the target.
Parameters:
- target (
string) — scroll target selector or element
Returns: boolean
app.spinner.isActive(el);