docs/components/display/Skeleton

Skeleton

Loading placeholder shimmer.

import { Skeleton } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#More Examples

Circle

<Skeleton variant="circle" size={60} />

Text

<Skeleton variant="text" lines={3} />

#Props

PropTypeDefaultDescription
variant'rect' | 'circle' | 'text''rect'Shape variant.
widthstring | number'100%'Width (CSS value or pixels). Only applies to rect variant.
heightstring | number'20px'Height (CSS value or pixels). Only applies to rect variant.
sizenumber40Diameter for circle variant in pixels.
linesnumber3Number of lines for text variant.
classstringAdditional CSS classes.
unstyledbooleanfalseRemove all default styling classes.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-bg-tertiary
  • --sk-radius-sm
  • --sk-space-sm
  • --sk-text-primary