axi-designv1.50.0

Feedback

Skeleton

A placeholder bar for text or a figure that is still loading. It sits inside the real element, so the finished content lands where the bar was.

.axi-skeleton .axi-skeleton--figure .axi-skeleton--chip .axi-skeleton--tile

Put the bar inside the element it stands in for - a .axi-stat__n, a table cell, a row name - never beside it. Its height is a fraction of that element's font, so when the data lands the text takes the same line box and nothing below it moves. Keep the surrounding markup real as well: the real table head, the real stat labels. A skeleton is the finished view with its data missing, not a drawing of one.

Set the length with --axi-skeleton-w. Vary it from a fixed list rather than at random, so a re-render draws the same skeleton instead of a twitching one.

The sweep is a flat band moved by transform (rule 11), not a feathered gradient (rule 1). Under prefers-reduced-motion the band is not drawn and the bar holds still. Mark the region that holds skeletons with aria-busy="true" and a label naming what is loading; the bars themselves say nothing to a screen reader.

Each variant

<div class="axi-row"><span class="axi-skeleton" style="--axi-skeleton-w: 120px"></span><span class="axi-skeleton axi-skeleton--figure" style="--axi-skeleton-w: 56px"></span><span class="axi-skeleton axi-skeleton--chip"></span><span class="axi-skeleton axi-skeleton--tile"></span></div>

Inside a stat

Members
<div class="axi-stat"><b class="axi-stat__n"><span class="axi-skeleton axi-skeleton--figure" style="--axi-skeleton-w: 56px"></span></b><span class="axi-stat__k">Members</span></div>

Knobs

PropertySetsFallback
--axi-skeleton-wthe length of an .axi-skeleton bar100% (56px on .axi-skeleton--chip)

Rules this answers