Skip to main content

Concepts

Wrapper​

Use .sk as the root class for a skeleton block. It defines the default tokens and scopes skeleton behavior to child elements.

<div class="sk">...</div>

Animations​

Apply one animation class to the .sk wrapper:

ClassBehavior
.sk-shimmerMoving gradient shimmer
.sk-pulseOpacity pulse
.sk-waveSubtle scale and opacity wave
.sk-noneNo animation

Animations automatically stop when the user has enabled reduced motion.

Primitives​

Use primitives to represent common loading shapes:

ClassPurpose
.sk-lineText line
.sk-boxGeneric rectangle
.sk-circleGeneric circle
.sk-avatarAvatar placeholder
.sk-imageResponsive image placeholder
.sk-buttonButton placeholder
.sk-badgeBadge or pill placeholder
.sk-iconIcon placeholder

Layout Utilities​

Skelia includes layout helpers for common skeleton compositions:

ClassPurpose
.sk-rowHorizontal layout with centered items
.sk-row-startHorizontal layout with top-aligned items
.sk-row-betweenHorizontal layout with space between items
.sk-stackVertical layout
.sk-gridGrid layout
.sk-grid-2Two-column grid
.sk-grid-3Three-column grid
.sk-flex-1Flexible child that fills remaining space

Sizing Utilities​

Width utilities are available in common percentages:

<div class="sk-line sk-w-75"></div>

Available widths:

sk-w-10 sk-w-20 sk-w-25 sk-w-30 sk-w-40 sk-w-50
sk-w-60 sk-w-70 sk-w-75 sk-w-80 sk-w-90 sk-w-100

Height utilities:

sk-h-xs sk-h-sm sk-h-md sk-h-lg sk-h-xl sk-h-2xl

Square size utilities:

sk-size-xs sk-size-sm sk-size-md sk-size-lg sk-size-xl

Border radius utilities:

sk-rounded-none sk-rounded-sm sk-rounded-md
sk-rounded-lg sk-rounded-xl sk-rounded-full

Aspect ratio utilities:

sk-ratio-1-1 sk-ratio-4-3 sk-ratio-3-2
sk-ratio-16-9 sk-ratio-21-9

Spacing utilities:

sk-gap-xs sk-gap-sm sk-gap-md sk-gap-lg sk-gap-xl
sk-mt-xs sk-mt-sm sk-mt-md sk-mt-lg
sk-mb-xs sk-mb-sm sk-mb-md sk-mb-lg