Holds the place of content that is still loading.
import { Skeleton } from "@usememos/ui";
<Skeleton round />
<Skeleton width="40%" />
<Skeleton />interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
width?: number | string; // default: full width (round: its height)
height?: number | string; // default: one line of text at `size` (round: the control height)
round?: boolean; // for avatars
size?: Size;
render?: React.ReactElement;
}- Match the shape of what is coming: one bar per line of text, a circle for an avatar, a block for an image. The layout must not jump when content arrives.
- Use skeletons for lists and pages, and Spinner for a control that is waiting.
- Skeletons are hidden from screen readers. Set
aria-busyon the loading region.
- A
wellblock that shimmers once everyduration-shimmer. The shimmer stops under reduced motion.