View as Markdown

API reference: @salmonui/notifications/skeleton

SkeletonPropsinterface

import type { SkeletonProps } from '@salmonui/notifications/skeleton';
interface SkeletonProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
    shape?: SkeletonShape;
    lines?: number;
    width?: number | string;
    height?: number | string;
    animation?: SkeletonAnimation;
    loading?: boolean;
    children?: ReactNode;
    ref?: Ref<HTMLSpanElement>;
}
SkeletonProps members (8)
NameSignatureDescription
shapeoptionalshape?: SkeletonShape;

'text' (default, a line of text height), 'circle' or 'rect'.

linesoptionallines?: number;

Text lines (shape="text"); the last of several lines is shorter.

widthoptionalwidth?: number | string;

Inline size: a number of pixels or any CSS length.

heightoptionalheight?: number | string;

Block size: a number of pixels or any CSS length.

animationoptionalanimation?: SkeletonAnimation;

'wave' (default, the transform-only shimmer shared with the Data Grid skeleton rows), 'pulse' (opacity) or false (static). Every animation stops under prefers-reduced-motion.

loadingoptionalloading?: boolean;

Shows the placeholder (default true). With children, loading={false} renders only the children and loading sizes the placeholder from them while they are hidden and inert.

childrenoptionalchildren?: ReactNode;

Content the placeholder stands in for.

refoptionalref?: Ref<HTMLSpanElement>;

The root <span>.