Skip to Content
ComponentsSkeleton

Skeleton

A placeholder that indicates content is loading. Displays a pulsing animation to represent where content will appear.

Import

import { Skeleton } from '@grannyshot/ui'

Usage

<Skeleton width={200} height={20} />

Variants

Rectangular (default)

<Skeleton variant="rectangular" width={200} height={120} />

Text

<Skeleton variant="text" width={160} />

Circular

<Skeleton variant="circular" width={48} height={48} />

Composing a loading state

<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}> <Skeleton variant="circular" width={40} height={40} /> <div> <Skeleton variant="text" width={120} /> <Skeleton variant="text" width={80} /> </div> </div>

Props

PropTypeDefaultDescription
variant'text' | 'circular' | 'rectangular''rectangular'Shape of the skeleton
widthnumber | stringWidth of the skeleton
heightnumber | stringHeight of the skeleton
classNamestringAdditional CSS classes

Extends all native <div> HTML attributes.

Last updated on