GPU-accelerated shimmer placeholder primitives with zero-layout-shift sizing and optional View Transitions API wipe reveals.
Made by AxylStandard card skeleton loading with Motion shimmer blocks and zero-layout-shift overlays.
skeleton-shimmer provides two flexible, GPU-accelerated primitives:
SkeletonShimmer: A standalone shimmer block for fixed or fluid layout placeholders (avatars, image banners, simple text bars).SkeletonOverlay: A zero-layout-shift wrapper that sizes itself using invisible children (visibility: hidden). This eliminates Cumulative Layout Shift (CLS) by matching the exact line heights, margins, and typography of the incoming content.The shimmer surface reads two CSS variables: --sk-shimmer-from (block fill) and --sk-shimmer-to (moving highlight). Both default to mixes of your app's --muted / --foreground tokens, so the sweep stays visible in light and dark themes. Override either to retint:
Use SkeletonShimmer directly for simple placeholder shapes:
SkeletonOverlay)Instead of guessing widths and heights, wrap your actual content structure in SkeletonOverlay. The inner elements determine the exact dimensions while remaining hidden:
Pair SkeletonShimmer and SkeletonOverlay with the browser's View Transitions API for a right-to-left mask wipe transition:
A complete profile card skeleton transitioning into revealed content via native View Transitions API wipe animation.
| Prop | Type | Default |
|---|---|---|
duration? | number | 1.5 |
borderRadius? | number | string | - |
animate? | boolean | true |
className? | string | - |
ref? | Ref<HTMLDivElement> | - |
| Prop | Type | Default |
|---|---|---|
children? | ReactNode | - |
duration? | number | 1.5 |
borderRadius? | number | string | "6px" |
animate? | boolean | true |
className? | string | - |
ref? | Ref<HTMLDivElement> | - |
All primitives respect prefers-reduced-motion: reduce via useReducedMotion() from motion/react. When reduced motion is requested, the continuous shimmer animation is disabled while still rendering the styled placeholder surface, and view transitions degrade gracefully to an instantaneous swap.
Inspired by motion.dev skeleton-shimmer. Reimplemented for Motion and React.
Built by Axyl. A motion-first component registry for React.
Last updated: 9/14/2026
Help keep SoraLabs moving.
Every contribution helps us build and maintain open-source tools for the community.
Sponsor on GitHub