Feedback
Skeleton
A placeholder shape shown while real content is loading, so layout doesn’t jump when it arrives.
Installation #
With the Nuxt module, every component is auto-imported — there is nothing to add. In a plain Vue project, import what you use:
Copy
import { JSkeleton } from '@juxtui/ui'Usage #
Copy
<JSkeleton shape="circle" />
<JSkeleton shape="text" :lines="3" />Size a skeleton to match the content it stands in for — give it the same width and height (or wrap it) so nothing shifts once the real content mounts.
The pulse is a slow breath, not a shimmer, and turns off entirely under prefers-reduced-motion.
Variants & examples #
Shapes#
Rect for blocks of media, circle for avatars, text for lines of copy.
Loading state of a card#
API #
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| shape | 'rect' | 'text' | 'circle' | 'rect' | text renders one or more lines; circle suits avatars. |
| lines | number | 1 | Number of lines for text. The last one is shorter, like a real paragraph. |
| width | string | — | Any CSS length, e.g. 12rem or 100%. |
| height | string | — | Any CSS length. For text, sets the height of each line. |
Accessibility #
- Marked
aria-hidden="true"— it stands in for content that isn’t there yet, so it has nothing to announce. - Announce the loading state itself separately, e.g. with an
aria-liveregion or a nearbyJSpinnerwith alabel.