Skip to content

Skeleton & Spinner ​

Use to show a placeholder while content is loading. An indicator that can be used to show a loading state.

Skeleton ​

Approximate web preview — the HarmonyOS rendering is the reference.

Card ​

Approximate web preview — the HarmonyOS rendering is the reference.

Motion ​

motion: 'pulse' (default) | 'shimmer' | 'none'.

Approximate web preview — the HarmonyOS rendering is the reference.

Lines & presets ​

lines: N; preset: 'text' | 'list' | 'card'.

Approximate web preview — the HarmonyOS rendering is the reference.

Spinner ​

Approximate web preview — the HarmonyOS rendering is the reference.

API ​

Extracted from the @Param / @Event / @BuilderParam declarations in the library sources.

SSkeleton ​

shadcn-vue Skeleton: bg-accent animate-pulse rounded-md. Size it with boxWidth / boxHeight (named so they do not clash with the universal width/height attributes), or with modifier. circle makes it fully rounded (avatars).

Variants: motion pulse (default) | shimmer (a highlight sweeping across) | none; lines renders a paragraph of N text lines (the last one shorter); preset text | list (avatar + two lines) | card (media + lines).

The motion runs on its own child node (removed when motion changes) and follows --motion-skeleton-*.

PropTypeDefaultDescription
boxWidthLength | undefinedundefined
boxHeightLength | undefinedundefined
circlebooleanfalse
motionSkeletonMotion
SkeletonMotion = 'pulse' | 'shimmer' | 'none'
'pulse'
linesnumber0Paragraph of N text lines (overrides the plain box).
presetSkeletonPreset | undefined
SkeletonPreset = 'text' | 'list' | 'card'
undefined
modifierAttributeModifier<ColumnAttribute>new SparkNoopModifier<ColumnAttribute>()

Slots: children (trailing closure)

SSpinner ​

shadcn-vue Spinner: a loader-circle icon with animate-spin (linear, infinite). Motion key spinner: one turn takes 5 × the normal duration (1 s by default); with motion off the icon is shown still. Remove the spinner to stop it (it restarts when it is shown again).

PropTypeDefaultDescription
sizingnumber16Icon size in vp (size-4 = 16).
colorResourceColor | undefinedundefinedDefaults to the foreground token (currentColor).
labelResourceStr$r('app.string.spark_loading')Accessible name.

MIT Licensed