Components
Skeleton

Skeleton

The Skeleton component provides you with loading placeholders.

Import

import { Skeleton } from '@nostromo/ui-core'
// or
import { Skeleton } from '@nostromo/ui-core/skeleton'

Usage

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

Live Examples

Live Example
☀️
Copy
Storybook →
View Code
import { Skeleton } from '@nostromo/ui-core' 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> )...

Card Skeleton

Live Example
☀️
Copy
Storybook →
View Code
import { Skeleton } from '@nostromo/ui-core' 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-*).