Shimmering Skeleton Wrapper
One angled GPU sweep that travels across any placeholder geometry you wrap, never a separate shimmer stuttering per row.
elite micro interactionsshimmeringskeletonwrapperframer motion
Installation
Run the following command
~/your-project
pnpm dlx wensity@latest add shimmering-skeleton-wrapper
Usage
Import ShimmeringSkeletonWrapper from @/components/wensity/shimmering-skeleton-wrapper and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.
app/example.tsx
import {ShimmeringSkeletonWrapper,SkeletonBox,SkeletonLine,SkeletonCircle,} from "@/components/wensity/shimmering-skeleton-wrapper";export default function Example({ loading }: { loading: boolean }) {return (<ShimmeringSkeletonWrapper loading={loading} rounded="rounded-2xl"><div className="rounded-2xl border bg-white p-5"><div className="flex items-center gap-3"><SkeletonCircle size={44} /><div className="flex-1 space-y-2"><SkeletonLine width="55%" /><SkeletonLine width="35%" /></div></div><div className="mt-5 space-y-2"><SkeletonLine width="92%" /><SkeletonLine width="78%" /></div></div></ShimmeringSkeletonWrapper>);}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | - | Placeholder geometry to wrap. Use SkeletonBox / SkeletonLine / SkeletonCircle helpers. |
loading | boolean | true | Show the skeleton shimmer. When false, renders children with no shimmer. |
duration | number | 1.6 | Sweep cycle duration in seconds. |
highlight | string | "var(--shimmer-hi)" | Highlight color of the moving slice. |
base | string | "var(--shimmer-base)" | Resting color of each placeholder box. |
rounded | string | - | Optional border-radius class applied to the wrapper. |
