PXD

Loading Mask

Cover an element with a spinner and a loading hint. Locks the scroll of the containing element while visible.

Default

Content behind the mask
<template>
  <div class="relative h-32 max-w-full overflow-hidden rounded-lg border border-border">
    <div class="flex h-full items-center justify-center text-sm text-foreground-secondary">
      Content behind the mask
    </div>

    <PLoadingMask />
  </div>
</template>

Custom text

Content behind the mask
<template>
  <div class="relative h-32 max-w-full overflow-hidden rounded-lg border border-border">
    <div class="flex h-full items-center justify-center text-sm text-foreground-secondary">
      Content behind the mask
    </div>

    <PLoadingMask text="Fetching..." />
  </div>
</template>

Props

NameTypeDefaultDescription
textstringLoading...Hint text shown next to the spinner

Slots

NameDescription
defaultDefault content.

Source

Source