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.
Text lines
With rows, the last line is shortened to 60% for a natural paragraph.
Code
Card layout
Code
Image placeholder
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. |