Skip to content

Accessibility: Work in progress

Translations: Not Needed

Skeleton

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

Basic Usage (Single line skeleton)

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

Multi Lines

Vue
html
<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>
  import { HLSkeleton, HLSpace } from '@platform-ui/highrise'
</script>

Other Examples

Vue
html
<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>
  import { HLSkeleton, HLSpace } from '@platform-ui/highrise'
</script>

Static (non-animated)

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

Non-rounded

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

Imports

Vue
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