Skeleton
Base UIA placeholder that preserves layout while content loads.
ReadyResponsive
Usage
Package export"use client"
import { Skeleton } from "@jnpll/elements-ui/skeleton"
export function SkeletonDemo() {
return (
<div className="flex items-center gap-4">
<Skeleton className="h-12 w-12 rounded-full" />
<div className="space-y-2">
<Skeleton className="h-4 w-[250px]" />
<Skeleton className="h-4 w-[200px]" />
</div>
</div>
)
}
export default SkeletonDemo;
Examples
Default composition
"use client"
import { Skeleton } from "@jnpll/elements-ui/skeleton"
export function SkeletonDemo() {
return (
<div className="flex items-center gap-4">
<Skeleton className="h-12 w-12 rounded-full" />
<div className="space-y-2">
<Skeleton className="h-4 w-[250px]" />
<Skeleton className="h-4 w-[200px]" />
</div>
</div>
)
}
export default SkeletonDemo;
API Reference
| Prop | Type / description | Default |
|---|---|---|
children | ReactNodeComponent content and composition slots. | - |
className | stringAdditional classes, merged with the component styles. | - |
Composition & accessibility
Import the composition slots shown in the example. Keep labels and descriptions meaningful; interactive primitives provide keyboard and focus behavior. See the source for the complete typed API.