Skip to content

Skeleton

The Skeleton component displays loading placeholders with customizable size and shape.

import { Skeleton } from '@fintech-sandpit/ui/react';
return (
<div className="space-y-6 max-w-md">
<div className="flex items-start gap-4">
<Skeleton.Circle size="2.5rem" />
<Skeleton.Text noOfLines={2} />
</div>
<Skeleton.Square className="w-full h-48" />
</div>
);

Skeleton components accepts all standard HTML div attributes. Use CSS classes to control width and height.

NameTypeRequiredDefaultDescription
sizeCssUnit2emSize of the circle
NameTypeRequiredDefaultDescription
gapCssUnit0.5emGap between text lines
noOfLinesnumber3Number of text lines to render
type CssUnit = `${number}${UnitToken}`
type UnitToken = 'px' | 'em' | 'rem' | 'vw' | 'vh' | 'vmin' | 'vmax' | '%'