Customization

Theming

CSS variables for color, shape and animation.
Color
Density
Radius
:root {
  --skeleton-color: color-mix(in srgb, #00c16a 20%, transparent);
  --skeleton-radius: 6px;
}

Variables

VariablePurpose
--skeleton-colorbone color
--skeleton-line-colorcolor of remembered borders and dividers; by default each keeps its own border color
--skeleton-radiusbar corner radius
--skeleton-highlightshimmer color
--skeleton-shimmernone turns the shimmer off
--skeleton-pulseskeleton-pulse turns pulsing on
--skeleton-holdhow long to wait before showing a skeleton, 150ms by default
--skeleton-text-topwhere a text bar starts: cap-height by default, ascender or x-height
--skeleton-text-bottomwhere a text bar ends: descender by default, or baseline

Dark mode

Variables are plain CSS, so dark mode works like everything else:

:root { --skeleton-color: rgb(0 0 0 / 0.08); }
.dark { --skeleton-color: rgb(255 255 255 / 0.09); }

With prefers-reduced-motion, animation turns itself off.