Skip to Content
ComponentsSkeleton

Skeleton

The Skeleton component provides you with loading placeholders.

Live Examples

Live Example
☀️
Copy
View Code
import { Skeleton } from '@jarllyng/nostromo' export default function SkeletonExample() { return ( <div className="space-y-4"> <Skeleton className="h-4 w-[250px]" /> <Skeleton className="h-4 w-[200px]" /> <Skeleton className="h-4 w-[150px]" /> </div> )...

Import

import { Skeleton } from "@jarllyng/nostromo"; // or import { Skeleton } from "@jarllyng/nostromo/skeleton";

Usage

import { Skeleton } from "@jarllyng/nostromo"; export default function Example() { return <Skeleton className="h-4 w-[250px]" />; }

Card Skeleton

Live Example
☀️
Copy
View Code
import { Skeleton } from '@jarllyng/nostromo' export default function CardSkeleton() { return ( <div className="space-y-4"> <Skeleton className="h-4 w-[250px]" /> <Skeleton className="h-4 w-[200px]" /> <Skeleton className="h-4 w-[150px]" /> <Skeleton className="h-4 w-[100px]" /> </div>...

Props

PropTypeDefaultRequiredDescription
shape"default" | "circle" | "square""default"NoShape of the skeleton
size"sm" | "default" | "lg""default"NoSize of the skeleton
widthstring | numberundefinedNoWidth of the skeleton
heightstring | numberundefinedNoHeight of the skeleton
linesnumberundefinedNoNumber of lines (for text skeleton)
spacing"none" | "sm" | "md" | "lg""md"NoSpacing between lines
loadingbooleantrueNoWhether skeleton is in loading state
classNamestringundefinedNoAdditional CSS classes
childrenReact.ReactNodeundefinedNoSkeleton content

Standard HTML Props

The Skeleton component extends standard HTML div attributes (e.g., id, data-*, aria-*).

Last updated on