Skeleton

Used to show a placeholder while content is loading.

feedback
loading
placeholder

Preview

Variants

Default skeleton for avatar and text.

Code

TSX
1
2
3
4
5
6
7
8
9
10
11
12
13
import { Skeleton } from "@/components/ui/skeleton"

export function SkeletonDemo() {
  return (
    <div className="flex items-center space-x-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>
  )
}

API Reference

PropTypeDefaultDescription
classNamestring-Additional CSS classes to style the skeleton.