examples/skeleton-text.tsx
import { SkeletonText } from "@/components/wensity/skeleton";export function TextSkeleton() {return <SkeletonText rows={5} widths={["92%", "100%", "74%", "46%"]} />;}
Loading placeholders for text, avatars, cards, and tables, plus a wrapper for composing your own custom layouts.
Practical examples and common states for the same installable component.
Line placeholders with realistic width rhythm.
import { SkeletonText } from "@/components/wensity/skeleton";export function TextSkeleton() {return <SkeletonText rows={5} widths={["92%", "100%", "74%", "46%"]} />;}
Circular identity placeholders that match avatar sizes.
import { SkeletonAvatar } from "@/components/wensity/skeleton";export function AvatarSkeleton() {return <SkeletonAvatar size="lg" />;}
A composed media, identity, and text loading shell.
import { SkeletonCard } from "@/components/wensity/skeleton";export function CardSkeleton() {return <SkeletonCard />;}
Header and row placeholders for dense data screens.
import { SkeletonTable } from "@/components/wensity/skeleton";export function TableSkeleton() {return <SkeletonTable rows={5} columns={4} />;}
Raw blocks for product-specific loading layouts.
| 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. |