Bonusway design system

Data display

Skeleton

A placeholder in the shape of the content that is coming. Better than a spinner wherever the layout is known, because the page doesn’t jump when the data lands.

import Skeleton from '@/components/ui/Skeleton';

Source: src/components/ui/Skeleton.tsx

Examples

Variants

Size it with utilities — the variant only decides the shape.

Matching the real card

The point is the shape. A skeleton that doesn’t match what replaces it produces exactly the layout shift it was meant to prevent.

Props

<Skeleton> props

PropTypeDefaultDescription
variant'text' | 'rect' | 'circle''text'—
classNamestring''

Size via utilities, e.g. className="h-[160px]" or "h-[40px] w-[40px]" for a circle.

Accessibility

  • Decorative — it carries no text. Mark the region it fills as busy (aria-busy) so a screen reader isn’t told the page is finished.

Šī lapa lieto sīkfailus

Mēs izmantojam sīkfailus, lai uzlabotu tavu pieredzi mūsu vietnē un pielāgotu saturu, ko mēs tev piedāvājam. Būtiski sīkfaili ir nepieciešami, lai mūsu pakalpojums darbotos pareizi. Ja esi priecīgs, ka mēs apkopojam informāciju, izmantojot mārketinga sīkdatnes, tad izvelies “Pieņemt visu”. Vienmēr vari mainīt minētos iestatījumus, apmeklējot sīkfailu iestatījumus.

Sīkfailu iestatījumi