Skip to content
RTL Support: Full
Accessibility: Full
Translations: Not Needed

Skeleton

Skeleton is a component that displays a loading state for a component.

Basic Usage

Renders a single text skeleton line.

vue
<template>
  <HLSkeleton id="skeleton-1" text />
</template>
<script setup lang="ts">
import { HLSkeleton } from '@platform-ui/highrise'
</script>

Multi Lines

Stacks multiple skeletons of varying widths to mimic a block of text.

vue
<template>
  <HLSpace :size="10" vertical id="skeleton-2-wrap">
    <HLSkeleton width="70%" height="24px" id="skeleton-2" />
    <HLSkeleton width="100%" height="16px" id="skeleton-3" />
    <HLSkeleton width="90%" height="16px" id="skeleton-4" />
    <HLSkeleton width="80%" height="16px" id="skeleton-5" />
  </HLSpace>
</template>
<script setup lang="ts">
import { HLSkeleton, HLSpace } from '@platform-ui/highrise'
</script>

Composed Layout

Combines fixed-size and repeated skeletons to outline a more complex content placeholder.

vue
<template>
  <HLSpace :size="10" vertical id="skeleton-6-wrap">
    <HLSkeleton width="60px" height="60px" id="skeleton-6" />
    <HLSkeleton width="60%" height="24px" id="skeleton-7" />
    <HLSkeleton width="90%" height="16px" :repeat="2" id="skeleton-8" />
  </HLSpace>
</template>
<script setup lang="ts">
import { HLSkeleton, HLSpace } from '@platform-ui/highrise'
</script>

Static

Disables the shimmer animation with :animated="false" and renders a non-animated skeleton.

vue
<template>
  <HLSkeleton width="200px" height="24px" :animated="false" id="skeleton-9" />
</template>
<script setup lang="ts">
import { HLSkeleton } from '@platform-ui/highrise'
</script>

Non-rounded

Renders square corners with :round="false".

vue
<template>
  <HLSkeleton width="200px" height="24px" :round="false" id="skeleton-10" />
</template>
<script setup lang="ts">
import { HLSkeleton } from '@platform-ui/highrise'
</script>

Accessibility

  • Keep skeleton placeholders aria-hidden="true" so they never read as actual content.
  • Mark the parent container aria-busy="true" until real data replaces the skeletons.

Imports

ts
import { HLSkeleton } from '@platform-ui/highrise'

Props

PropTypeDefaultDescription
id *stringundefinedID of the skeleton
textbooleantrueText skeleton
repeatnumber1Number of times to repeat
widthstring | number'100%'Width of the skeleton
heightstring | number'18px'Height of the skeleton
animatedbooleantrueWhether to animate the skeleton
roundbooleantrueWhether to have rounded corners on the skeleton