npm install @thrivecart/uiyarn add @thrivecart/uipnpm add @thrivecart/uibun add @thrivecart/uiimport { Skeleton } from '@thrivecart/ui';Simple skeleton shapes
<div className="flex flex-col gap-3">
<Skeleton className="h-4 w-3/4" />
<Skeleton className="h-4 w-1/2" />
<Skeleton className="h-4 w-5/6" />
</div>Skeleton mimicking a card layout
<div className="border rounded-lg p-4 space-y-3">
<Skeleton className="h-6 w-1/3" />
<Skeleton className="h-4 w-full" />
<Skeleton className="h-4 w-4/5" />
<div className="flex gap-2 pt-2">
<Skeleton className="h-8 w-20 rounded" />
<Skeleton className="h-8 w-20 rounded" />
</div>
</div>Skeleton for a user profile row
<div className="flex items-center gap-3">
<Skeleton className="h-10 w-10 rounded-full" />
<div className="flex flex-col gap-1.5">
<Skeleton className="h-4 w-32" />
<Skeleton className="h-3 w-24" />
</div>
</div>Skeletons should closely match the shape and size of the final content.
Skeleton works best when you know the structure of the incoming content.
If content loads in under 300ms, skip the skeleton to avoid flickering.
The pulse animation should be subtle and calming, not distracting.
aria-hidden="true" as they are purely decorative.aria-busy="true" on the container element while loading.aria-live regions.