Browse components
Skeleton Swap
A shimmering placeholder that dissolves into the real content when loading ends: the skeleton blurs out, the content sharpens in and the box eases to its new height.
Installation
npx shadcn@latest add @glint-ui/skeleton-swapFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/skeleton-swap.json
Usage
import { SkeletonSwap } from "@/components/ui/skeleton-swap";
<SkeletonSwap loading={isLoading}>
<ProfileRow user={user} />
</SkeletonSwap>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| lines | number | 3 | Text lines in the default placeholder. |
| avatar | boolean | true | Show a round avatar in the default placeholder. |
| shimmer | boolean | true | Sweep a highlight across the placeholder. |
| duration | number | 0.45 | Cross-fade length in seconds. |
| loading | ReactNode | — | Show the skeleton while true. |
| skeleton | ReactNode | — | Custom placeholder node. |
| className | string | — | Extra classes for the root element. |