HextaUI

Skeleton: Animations

animation picks a sweeping shimmer, a soft pulse, or none.

shimmer
pulse
none
import { Skeleton, type SkeletonAnimation } from "@/components/ui/skeleton"

const animations: SkeletonAnimation[] = ["shimmer", "pulse", "none"]

export function SkeletonAnimations() {
  return (
    <div className="grid w-full max-w-md grid-cols-3 gap-3">
      {animations.map((animation) => (
        <div key={animation} className="flex flex-col gap-2">
          <Skeleton animation={animation} className="h-16 w-full" />
          <span className="text-xs text-muted-foreground">{animation}</span>
        </div>
      ))}
    </div>
  )
}

This adds the example as components/examples/skeleton/animations.tsx, together with the Skeleton component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/skeleton-animations.json

To add only the component, follow the Skeleton installation.

Props in this example

The Skeleton props this example sets, from the API reference.

PropTypeDefault
animation
"shimmer" | "pulse" | "none""shimmer"

Every prop is in the Skeleton API reference.

See them all, with keyboard support and accessibility notes, on the Skeleton page.