Skip to content

Built-in indicators ​

LoaderKit ships 50 indicators. They have the same names, params and motion on every platform. Click an indicator to open its panel: change params, color, speed and size, then copy the code for your platform.

Built-in or progress?

  • No percentage, ever (waiting for a request, pull to refresh): use a built-in indicator from this page.
  • The task has progress, even if it is unknown at first (a download, an upload, processing a file): use a progress indicator. Start it indeterminate with value null (nil in Swift), then set a value once you know it. It is the same component, so nothing else changes.

Names and params ​

Only two built-ins take params today. Every other indicator has a fixed design, and you change it with color, colors, size and speed.

IndicatorParams (default)Cycle (s)
Atomnone1.5
AudioEqualizernone4.3
BallBeatnone0.7
BallClipRotatenone0.75
BallClipRotateMultiplenone1
BallClipRotatePulsenone1
BallDoubleBouncenone2
BallFallnone1
BallGridBeatnone1
BallGridPulsenone1
BallHelixnone1.8
BallHoneycombnone1.4
BallMergenone1.4
BallPulsecount (3), minScale (0.3)0.75
BallPulseRisenone1
BallPulseSyncnone0.6
BallRotatenone1
BallRotateChasenone1.5
BallScalenone1
BallScaleMultiplenone1
BallScaleRipplenone1
BallScaleRippleMultiplenone1.25
BallSpinFadeLoadercount (8), minScale (0.4), minOpacity (0.3)1
BallSquareSpinnone1
BallTrianglePathnone2
BallZigZagnone0.7
BallZigZagDeflectnone1.5
ChasingDotsnone2
CircleStrokeSpinnone1.7
CubeTransitionnone1.6
JellyBoxnone0.9
LineScalenone1
LineScalePartynone1
LineScalePulseOutnone1
LineScalePulseOutRapidnone0.9
LineSlidenone1.5
LineSpinFadeLoadernone1.2
NewtonCradlenone1.2
Orbitnone1.9
Pacmannone1
Radarnone2
RunningDotsnone2
SemiCircleSpinnone0.6
SquareGridFlipnone1.6
SquareGridWavenone1.3
SquareSpinnone3
Timernone4
TriangleOrbitnone2.1
TriangleSkewSpinnone3
TripleArcSpinnone2.4

The cycle is the length of one loop at speed 1. Use speed to make it faster or slower.

The params ​

ParamIndicatorMeaning
countBallPulseNumber of balls in the row. Rounded to the nearest integer, at least 1.
minScaleBallPulseSmallest scale of a ball during the pulse, from 0 to 1.
countBallSpinFadeLoaderNumber of balls on the ring. Rounded to the nearest integer, at least 1.
minScaleBallSpinFadeLoaderSmallest scale of a ball as it fades.
minOpacityBallSpinFadeLoaderLowest opacity of a ball as it fades.

Params you pass that an indicator does not declare are ignored, so it is safe to keep the same params when you switch indicators. See Customizing for the code.

List the names at runtime ​

ts
import { BUILTIN_INDICATOR_NAMES } from '@loader-kit/web';

console.log(BUILTIN_INDICATOR_NAMES); // ['Atom', 'AudioEqualizer', ...]
kotlin
import io.github.maitrungduc1410.loaderkit.BuiltinIndicators

BuiltinIndicators.names                 // List<String>
BuiltinIndicators["BallPulse"]          // IndicatorSpec?, null for an unknown name
swift
import LoaderKit

IndicatorSpec.builtinNames              // [String]
IndicatorSpec.builtin(named: "BallPulse")
csharp
using LoaderKit;

foreach (var name in BuiltinIndicators.Names) Console.WriteLine(name);
var spec = BuiltinIndicators.Get("BallPulse");

Unknown names ​

An unknown name never crashes. The view draws nothing and reports the problem:

PlatformWhere the error goes
WebspecError on LoaderKitView, the onError option, the loaderkit-error event of <loader-kit>
Android Viewthe onError callback (logged when it is not set)
Composea warning in Logcat
ApplespecError on LoaderKitView
WindowsSpecError and the SpecFailed event

Credits ​

The motion of most built-in indicators comes from NVActivityIndicatorView, loaders.css, DGActivityIndicatorView and SpinKit; the others were designed for LoaderKit. See THIRD_PARTY_NOTICES.md in the repository.

Released under the MIT License.