Controls

Skeleton

Preview
Reduced motion

Simulates prefers-reduced-motion for the demo. Off follows your system setting.

Keyboard stepping

Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.

Skeleton

Skeleton

A soft placeholder that melts into the real content once it loads.

Installation

npx shadcn@latest add ikislay/pixel-ui/skeleton

How to use

import { Skeleton } from "@/components/ui/skeleton"
export function Demo({ user }: { user?: { name: string } }) {
return (
<Skeleton loading={!user} className="h-4 w-40">
<p>{user?.name}</p>
</Skeleton>
)
}

Source Code

// Loading…

Props

Options you can pass to customize this component.

Prop
Type
Description
loading
boolean

Shows the placeholder while true and the children once false.

children
ReactNode

The real content to reveal when loading ends.

className
string

Sizes and shapes the placeholder, for example h-4 w-32 or size-11 rounded-full.