import { SkeletonText } from "@/components/wensity/skeleton";export function TextSkeleton() {return <SkeletonText rows={5} widths={["92%", "100%", "74%", "46%"]} />;}
Skeleton
React skeleton loading placeholders for text, avatars, cards, and tables, plus a custom block, with a soft shimmer that stops under reduced motion.
Examples
Practical examples and common states for the same installable component.
Text
Line placeholders with realistic width rhythm.
Avatar
Circular identity placeholders that match avatar sizes.
import { SkeletonAvatar } from "@/components/wensity/skeleton";export function AvatarSkeleton() {return <SkeletonAvatar size="lg" />;}
Card
A composed media, identity, and text loading shell.
import { SkeletonCard } from "@/components/wensity/skeleton";export function CardSkeleton() {return <SkeletonCard />;}
Table
Header and row placeholders for dense data screens.
import { SkeletonTable } from "@/components/wensity/skeleton";export function TableSkeleton() {return <SkeletonTable rows={5} columns={4} />;}
Custom
Raw blocks for product-specific loading layouts.
Overview
Skeleton is a React and Tailwind CSS skeleton loader, in Next.js or any React app, with ready made placeholders for text lines, avatars, cards, and tables, plus a plain block for custom shapes. A soft glint sweeps across each block, and the sweep only runs when the visitor has not asked for reduced motion. SkeletonText staggers line widths so a paragraph looks like a paragraph, SkeletonTable draws a header row above a configurable grid, and three tones fit different surfaces. Every placeholder is aria-hidden, so put aria-busy or a hidden loading message on the region that is waiting.
Installation
Run the following command
pnpm dlx wensity@latest add skeleton
npx wensity@latest add skeleton
yarn dlx wensity@latest add skeleton
bunx wensity@latest add skeleton
Usage
Import Skeleton from @/components/wensity/skeleton and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.
import { SkeletonText } from "@/components/wensity/skeleton";export function SkeletonDemo() {return <SkeletonText rows={3} />;}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "text" | "avatar" | "card" | "table" | "custom" | "custom" | Placeholder shape. custom takes its size from your own classes. |
tone | "neutral" | "soft" | "contrast" | "neutral" | Contrast of the placeholder against its surface. |
rows | number | 3 | Number of lines, for the text and table variants. |
animate | boolean | true | Runs the shimmer. Set false for static placeholders. |
Related primitives
Spinner
A React loading spinner in arc, ring, dots, and pulse styles with a screen reader label, five tones, three sizes, and an overlay that blocks a region.
Progress
A React progress bar on Base UI with spring smoothed fills and an indeterminate sweep, plus circular, stepped, and stacked multi part bars.
Card
A React card built from header, title, description, content, and footer parts, plus media frames, stat trends, sparklines, and a feature link row.
Aspect Ratio
A React aspect ratio container with 16:9, 21:9, 4:3, square, and portrait presets, plus an image that fades in over a shimmer once it loads.
Related components

Shimmering Skeleton Wrapper
One angled GPU sweep that travels across any placeholder geometry you wrap, never a separate shimmer stuttering per row.

Animated Loading Skeleton
An organic loading state instead of a spinner, with a slow aurora that breathes in the space where your content will land.

Progressive Image Loading
Images that develop from a blur, color, or shimmer placeholder, without layout shift.

Text Shimmer
A CSS shimmer sweep for headlines, one single element and entirely GPU-friendly.