Skeleton
weekendsuperhero-io-sistine/skeletonFreeComponent
Use to show a placeholder while content is loading with optional glass material.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/Weekendsuperhero-io/sistine/main/public/r/skeleton.jsonSource
1import { type MaterialAxisProps, materialSurface, splitAxisProps } from "@/lib/material";2import { cn } from "@/lib/utils";34/* Role: bordered adaptive glass. */5const ROLE = {6 border: true,7};89function Skeleton({10 className,11 variant = "glass",12 shimmer = true,13 ...props14}: React.HTMLAttributes<HTMLDivElement> &15 MaterialAxisProps & {16 variant?: "default" | "glass";17 /** Moving shimmer highlight (folded from the glass wrapper). */18 shimmer?: boolean;19 }) {20 const [axes, rest] = splitAxisProps(props);21 /* Variant classes carry BEHAVIOR only; the surface comes from materialSurface. */22 const variants = {23 default: "bg-muted animate-pulse",24 glass: "animate-pulse",25 };2627 const m = materialSurface(variant === "default" ? null : ROLE, axes);2829 return (30 <div31 data-slot="skeleton"32 data-material={m?.["data-material"]}33 className={cn(34 m?.className,35 "rounded-md",36 variants[variant],37 shimmer &&38 "relative overflow-hidden before:absolute before:inset-0 before:-translate-x-full before:bg-gradient-to-r before:from-transparent before:via-white/10 before:to-transparent before:animate-[shimmer_2s_infinite]",39 className,40 )}41 {...rest}42 />43 );44}4546export { Skeleton };
What it pulls in
npm packages
Other registry items
Files it writes
More from weekendsuperhero-io/sistine
All 71 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | weekendsuperhero-io/sistine | Components | Free | 5 deps · 4 files | |
| Alertalert | weekendsuperhero-io/sistine | Components | Free | 3 deps · 4 files | |
| Alert Dialogalert-dialog | weekendsuperhero-io/sistine | Components | Free | 4 deps · 4 files | |
| Auto Foregroundauto-foreground | weekendsuperhero-io/sistine | Components | Free | no deps | |
| Avataravatar | weekendsuperhero-io/sistine | Components | Free | 4 deps · 4 files | |
| Badgebadge | weekendsuperhero-io/sistine | Components | Free | 4 deps · 4 files | |
| Breadcrumbbreadcrumb | weekendsuperhero-io/sistine | Components | Free | 5 deps · 4 files | |
| Buttonbutton | weekendsuperhero-io/sistine | Components | Free | 4 deps · 4 files |
