Feedback
Layout
Skeleton
A placeholder shape that stands in for content while it loads. Use it when you know the layout before the data arrives.
Install
import { Skeleton } from 'vael-ui'Playground
Your content, drawn as bones while it loads
text
Usage
<script setup lang="ts">
import { Skeleton } from 'vael-ui'
</script>
<template>
<Skeleton>Your content, drawn as bones while it loads</Skeleton>
</template>Motion New
Skeleton: its appearance; false holds the pulse still.
<Skeleton
:motion="{ initial: { root: { opacity: 0, y: 4 } } }"
/>| Name | Type | Description |
|---|---|---|
initialexit | root | Sets where each part comes in from and leaves to: any CSS property, plus x, y and blur. A plain number is px, or degrees for rotate. |
enterleave | (parts, context) => animation | Animates the parts with GSAP, motion or element.animate(). Return the animation and the component waits for it, and stops it if interrupted. |
springdurationeasing | { damping, response } | number | string | Times all of it: a spring, or a duration in ms with an easing. Never both. |
false | boolean | Turns its motion off, for an animation of your own on its exposed elements. |
Accessibility
It has no keyboard interaction of its own.
- Always
aria-hidden; content in its slot only sizes it and stays hidden. - Screen readers get no loading state from it, so mark the region it stands for with
aria-busy="true"or add a Loader with alabel. - Under reduced motion, the pulse runs at half speed.