Feedback
Skeleton
Loading placeholders that match the shape of the real content.
<script>
import { Skeleton } from "@codeatlasdev/ui";
</script>
<Skeleton height="20px" width="60%" />
<Skeleton variant="circular" width={48} height={48} />
<Skeleton rows={3} />
Skeletons are aria-hidden. Announce the loading state on the container, for example with aria-busy="true", and leave the placeholders silent.
The skeleton prop
Avatar, KpiCard, TextField, Table, Card and GlassCard take skeleton. The component keeps its real DOM, so the placeholder has exactly the loaded size (no layout shift): content is laid out but hidden, the host paints the same shimmer as <Skeleton>, and it is announced with aria-busy="true". A skeleton TextField is disabled and an Avatar makes no image request. For Table, render placeholder rows so the height matches. Under prefers-reduced-motion the sweep stops and the placeholder is dimmed.
The sweep is a gradient band. Under the plain surface styles (defaultStyle: "flat", "solid" or "outlined", or data-style on <html>) no gradient is drawn: <Skeleton> and the skeleton prop pulse their opacity on a flat block instead. Glass, frosted, neumorphic, clay, chrome and tonal keep the sweep.
Text lines
With rows, the last line is shortened to 60% for a natural paragraph.
Reference #099 · Pick in the gallery
Code
Card layout
Reference #097 · Pick in the gallery
Code
The skeleton prop
One flag on the real component keeps its size while data loads.
Revenue
We never share it
Overview
The card keeps the exact size it has once loaded, so nothing shifts when the data arrives.
Reference #241 · Pick in the gallery
Code
Image placeholder
Reference #098 · Pick in the gallery
Code
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'text' | 'circular' | 'rectangular' | 'rounded' | 'text' | Shape of the placeholder. |
width | string | number | – | CSS width. Numbers are treated as pixels. |
height | string | number | – | CSS height. Numbers are treated as pixels. |
rows | number | 1 | Renders several stacked lines. For the text variant the last one is 60% wide. |
class | string | '' | Extra CSS classes. |