Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Code Block
- Collapsible
- Combobox
- Command
- Context Menu
- Copy Button
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Form
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Page Header
- Pagination
- Panel
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Section Header
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Stat
- Stat Card
- Switch
- Table
- Tabs
- Textarea
- Theme Toggle
- Toggle
- Toggle Group
- Tooltip
- Typography
Skeleton
Show a placeholder while content is loading.
01
Installation
Add the skeleton component with the shadcn CLI.
bash
npx shadcn@latest add https://swiss.ui.unsanity.ai/r/skeleton.json02
Usage
tsx
import { Skeleton } from "@/components/ui/skeleton"03
Examples
Default
import { Skeleton } from "@/components/ui/skeleton"
<div className="flex items-center gap-3">
<Skeleton className="size-12 rounded-full" />
<div className="space-y-2">
<Skeleton className="h-4 w-40" />
<Skeleton className="h-4 w-28" />
</div>
</div>