Skeleton
Placeholder shaped like content while it loads.
Installation
bun add @xerobi/ui
import { Skeleton } from "@xerobi/ui/skeleton"This component is client-side. In Astro, hydrate it with a client directive.
Examples
Default
import { Skeleton } from "@xerobi/ui/skeleton"
export function SkeletonDefault() {
return (
<div className="flex w-64 flex-col gap-2">
<Skeleton className="h-3 w-24" />
<Skeleton className="h-3 w-full" />
<Skeleton className="h-3 w-3/4" />
</div>
)
}API reference
Skeleton
Also accepts every prop of <div> element.
No props of its own.
Styling hooks: [data-slot="skeleton"].