Reference

API reference

Prop names and defaults come from the installed library build, alongside maintained type, slot and usage documentation.

Components

VLoader

The generic loader. The variant prop selects one of the 36 treatments and every named loader is a thin wrapper around it.

VLoader props
PropTypeDefaultDescription
variant"bars" | "bounce" | "dots" | "dot-sweep" | "equalizer" | "sliding-bars" | "spin" | "spin-dots" | "typing" | "wave" | "breathing" | "dual-arc" | "gradient-ring" | "orbit" | "orbit-dots" | "progress-ring" | "pulse" | "ring" | "ripple" | "rotate" | "signal" | "snake" | "blob" | "card-flip" | "element" | "flow" | "grid" | "hashtag" | "heatmap" | "liquid" | "logo-spin" | "morph" | "plane" | "squares" | "stair" | "fallback""spin"Selects the treatment rendered by the component. Unknown values fall back to `spin`.
colorstring"currentColor"Primary colour of the loader. Accepts any CSS colour value, including `currentColor`.
sizenumber40Diameter or height of the loader in pixels. Values below 12 are clamped to 12.
durationnumber1000Duration of one animation cycle in milliseconds. Values below 100 are clamped to 100.
countnumber4 (9 for heatmap/squares; 2 fixed for breathing/dual-arc)Number of marks rendered by treatments that repeat an element. Clamped to 1–12.
labelstring"Loading"Accessible name announced by the status region. An empty label makes the loader decorative.
decorativebooleanfalseHides the loader from assistive technology. Use it when an ancestor already announces the loading state.
valuenumber | nullnullCompletion percentage between 0 and 100. Only the progress ring renders the value.

VSkeleton

The skeleton primitive. It is also exported as VSkeletonLoader for catalogue parity.

VSkeleton props
PropTypeDefaultDescription
variant"text" | "rect" | "circle""text"Shape of the placeholder. Unknown values fall back to `text`.
widthnumber | string—Width as a pixel number or any CSS length. Defaults to `100%`, or `40px` for circles.
heightnumber | string—Height as a pixel number or any CSS length. Defaults to `1em` for text and `6rem` for rectangles.
borderRadiusnumber | string—Border radius as a pixel number or any CSS length. A shape appropriate default is used when omitted.
animatedbooleantrueEnables the shimmer animation. Reduced-motion preferences always disable it.
labelstring—Accessible name announced by the status region. Without a label the skeleton is decorative.

VPatternSkeleton

Renders one of the eleven layout patterns from a single component.

VPatternSkeleton props
PropTypeDefaultDescription
pattern"lines" | "article" | "card" | "profile" | "list" | "table" | "media" | "form" | "dashboard" | "feed" | "product""lines"Layout pattern rendered by the component.
rowsnumber3Number of repeated text lines, list items, fields or data rows. Clamped to 1–12. Table and dashboard headers are separate; dashboard always includes one fixed header.
columnsnumber3Number of columns in table and dashboard layouts. Clamped to 1–6.
mediaHeightnumber | string—Height of the media block in pixels or any CSS length.
avatarSizenumber48Diameter of the avatar block in pixels. Clamped to 1–160.
colorstring—Base colour of the placeholder blocks. Falls back to `--v-skeleton-base-color`.
highlightColorstring—Colour of the shimmer highlight. Falls back to `--v-skeleton-highlight-color`.
animatedbooleantrueEnables the shimmer animation. Reduced-motion preferences always disable it.
labelstring—Accessible name announced by the status region. Without a label the skeleton stays hidden from assistive technology.
showMediabooleantrueToggles the media block where the pattern supports one.
showAvatarbooleantrueToggles the avatar block where the pattern supports one.
showHeaderbooleantrueToggles the table header row.
showChartbooleantrueToggles the dashboard chart block.
showStatsbooleantrueToggles the statistic tiles used by profile and dashboard patterns.
showSubmitbooleantrueToggles the submit block used by the form pattern.
showRatingbooleantrueToggles the rating block used by the product pattern.
showPricebooleantrueToggles the price block used by the product pattern.
showCtabooleantrueToggles the call-to-action block used by the product pattern.

VSkeletonGroup

Groups placeholders with a shared gap and exposes the group as one status region.

VSkeletonGroup props
PropTypeDefaultDescription
labelstring—Accessible name announced by the group. Without a label the group does not create a status region.
gapstring"0.75rem"CSS gap between the child placeholders.
decorativebooleanfalseHides the whole group from assistive technology.

VSkeletonSwitch

Shows a skeleton while loading and the default slot afterwards.

VSkeletonSwitch props
PropTypeDefaultDescription
loadingbooleantrueRenders the skeleton while `true` and the default slot afterwards.
pattern"lines" | "article" | "card" | "profile" | "list" | "table" | "media" | "form" | "dashboard" | "feed" | "product""lines"Layout pattern rendered by the component.
rowsnumber3Number of repeated text lines, list items, fields or data rows. Clamped to 1–12. Table and dashboard headers are separate; dashboard always includes one fixed header.
columnsnumber—Number of columns in table and dashboard layouts. Clamped to 1–6.
mediaHeightnumber | string—Height of the media block in pixels or any CSS length.
avatarSizenumber48Diameter of the avatar block in pixels. Clamped to 1–160.
colorstring—Base colour of the placeholder blocks. Falls back to `--v-skeleton-base-color`.
highlightColorstring—Colour of the shimmer highlight. Falls back to `--v-skeleton-highlight-color`.
animatedbooleantrueEnables the shimmer animation. Reduced-motion preferences always disable it.
labelstring"Loading content"Accessible name announced by the status region. Without a label the skeleton stays hidden from assistive technology.
showMediabooleantrueToggles the media block where the pattern supports one.
showAvatarbooleantrueToggles the avatar block where the pattern supports one.
showHeaderbooleantrueToggles the table header row.
showChartbooleantrueToggles the dashboard chart block.
showStatsbooleantrueToggles the statistic tiles used by profile and dashboard patterns.
showSubmitbooleantrueToggles the submit block used by the form pattern.
showRatingbooleantrueToggles the rating block used by the product pattern.
showPricebooleantrueToggles the price block used by the product pattern.
showCtabooleantrueToggles the call-to-action block used by the product pattern.
VSkeletonSwitch slots
SlotDescription
defaultThe loaded content.
skeletonCustom placeholder shown while `loading` is `true`. Defaults to the selected pattern.

VAutoSkeleton

A safe content switcher. It never inspects slot content to infer a layout, it renders the pattern you choose.

VAutoSkeleton props
PropTypeDefaultDescription
loadingbooleantrueRenders the skeleton while `true` and the default slot afterwards.
pattern"lines" | "article" | "card" | "profile" | "list" | "table" | "media" | "form" | "dashboard" | "feed" | "product""lines"Layout pattern rendered by the component.
rowsnumber3Number of repeated text lines, list items, fields or data rows. Clamped to 1–12. Table and dashboard headers are separate; dashboard always includes one fixed header.
columnsnumber—Number of columns in table and dashboard layouts. Clamped to 1–6.
mediaHeightnumber | string—Height of the media block in pixels or any CSS length.
avatarSizenumber48Diameter of the avatar block in pixels. Clamped to 1–160.
colorstring—Base colour of the placeholder blocks. Falls back to `--v-skeleton-base-color`.
highlightColorstring—Colour of the shimmer highlight. Falls back to `--v-skeleton-highlight-color`.
animatedbooleantrueEnables the shimmer animation. Reduced-motion preferences always disable it.
labelstring"Loading content"Accessible name announced by the status region. Without a label the skeleton stays hidden from assistive technology.
showMediabooleantrueToggles the media block where the pattern supports one.
showAvatarbooleantrueToggles the avatar block where the pattern supports one.
showHeaderbooleantrueToggles the table header row.
showChartbooleantrueToggles the dashboard chart block.
showStatsbooleantrueToggles the statistic tiles used by profile and dashboard patterns.
showSubmitbooleantrueToggles the submit block used by the form pattern.
showRatingbooleantrueToggles the rating block used by the product pattern.
showPricebooleantrueToggles the price block used by the product pattern.
showCtabooleantrueToggles the call-to-action block used by the product pattern.
VAutoSkeleton slots
SlotDescription
defaultThe loaded content.
skeletonCustom placeholder shown while `loading` is `true`. Defaults to the selected pattern.

VSpinner

A compact status spinner for inline work.

VSpinner props
PropTypeDefaultDescription
sizenumber24Diameter of the spinner in pixels. Negative and non-finite values are normalised.
colorstring"currentColor"Accent colour of the active edge. The track uses `--v-spinner-track-color`.
labelstring"Loading"Accessible name announced by the status region. An empty label makes the spinner decorative.
decorativebooleanfalseHides the spinner from assistive technology. Use it when an ancestor already announces the loading state.

VProgress

A determinate or indeterminate progress bar.

VProgress props
PropTypeDefaultDescription
valuenumber | nullnullCurrent value. Omit it, pass `null`, or pass a non-finite value for an indeterminate bar.
minnumber0Lower bound of the value range.
maxnumber100Upper bound of the value range. When `max` is not greater than `min` the bar is indeterminate.
labelstring"Progress"Accessible name of the progress bar.
valueTextstring—Human readable value exposed through `aria-valuetext`. Only used while determinate.
heightnumber | string8Thickness of the bar in pixels or any CSS length.
colorstring—Colour of the filled portion. Overrides `--v-progress-color`.
trackColorstring—Colour of the unfilled track. Overrides `--v-progress-track-color`.

VLoading

Wraps content in an overlay and makes that content inert while it loads.

VLoading props
PropTypeDefaultDescription
loadingbooleanfalseShows the overlay, sets `aria-busy` on the wrapper and makes the content inert.
labelstring"Loading"Loading message. It is visually hidden and announced by the status region.
inertContentbooleantrueMakes the wrapped content inert while the overlay is active.
indicatorSizenumber28Diameter of the built-in spinner in pixels.
VLoading slots
SlotDescription
defaultThe content being loaded.
indicatorReplaces the built-in spinner.

VLoadingButton

A native button with a loading state.

VLoadingButton props
PropTypeDefaultDescription
loadingbooleanfalseDisables the button, sets `aria-busy` and shows the indicator.
disabledbooleanfalseNative disabled state. The button is also disabled while loading.
type"button" | "submit" | "reset""button"Native button type. The safe default avoids accidental form submission.
indicatorSizenumber16Diameter of the default indicator in pixels.
VLoadingButton slots
SlotDescription
defaultButton label. It stays in the accessibility tree and keeps its space while loading.
indicatorReplaces the built-in spinner.

Named loaders

Every named loader accepts the shared loader props: color, size, duration, count, label and decorative. VProgressRingLoader additionally accepts value.

Composables

useLoading()

Tracks concurrent asynchronous operations for a single loading state.

useLoading() members
MemberTypeDescription
isLoadingReadonly<Ref<boolean>>True while at least one operation is pending.
pendingCountReadonly<Ref<number>>Number of pending operations for this instance.
execute<T>(operation: () => Promise<T>) => Promise<T>Runs and tracks the operation. Results and errors pass through unchanged.

useDelayedLoading(options?)

Delays the indicator until the work has been pending for a while, so fast operations never flash a spinner.

useDelayedLoading(options?) members
MemberTypeDescription
delaynumberMilliseconds to wait before isLoading becomes true. Defaults to 200.
minVisibleDurationnumberMinimum milliseconds the indicator stays visible once it appears. Defaults to 0.

useLoadingGroup(sources)

Aggregates independent loading sources into one state without owning them.

useLoadingGroup(sources) members
MemberTypeDescription
isLoadingComputedRef<boolean>True when at least one source is active.
activeCountComputedRef<number>Number of sources that are currently active.

Exported types

All prop and return types are exported from the package root.

Types
ts
import {
  VLoader,
  type LoaderVariant,
  type NamedLoaderProps,
  type VProgressRingLoaderProps,
} from "veload";

CSS custom properties

Components use scoped styles and these custom properties. Set them on a component or on any ancestor.

CSS custom properties
ComponentCustom propertyDefault
VSpinner--v-spinner-border-width3px
VSpinner--v-spinner-track-colorcurrentColor
VSkeleton--v-skeleton-base-colorrgba(148, 163, 184, 0.28)
VSkeleton--v-skeleton-highlight-colorrgba(255, 255, 255, 0.55)
VSkeleton--v-skeleton-radius0.25em (text), 0.5rem (rect)
VSkeleton--v-skeleton-duration1.4s
VProgress--v-progress-color#2563eb
VProgress--v-progress-track-color#e2e8f0
VProgress--v-progress-radius999px
VProgress--v-progress-duration1.4s
VLoading--v-loading-overlay-backgroundrgba(255, 255, 255, 0.72)
VLoading--v-loading-color#334155
VLoading--v-loading-z-index10
VLoading--v-loading-radiusinherit
VLoading--v-loading-backdrop-filternone
VLoadingButton--v-loading-button-gap0.5rem

The loaders are styled entirely through their props, so they expose no custom properties.

VLoading uses a light translucent overlay by default, which assumes a light surface. On a dark surface, override --v-loading-overlay-background and --v-loading-color.