Skip to main content

SkeletonImage

SkeletonImage is used to provide a low fidelity representation of an image before it appears on the page.

Anchor to aspectRatio
aspectRatio
number

Displays the skeleton at the specified aspect ratio (fills the width of the parent container and sets the height accordingly).

Anchor to blockSize
blockSize
<number | `${number}%` | 'fill'>

Adjust the block size of the skeleton.

string

A unique identifier for the component.

Anchor to inlineSize
inlineSize
<number | `${number}%` | 'fill'>

Adjust the inline size of the skeleton.

Examples
import {
reactExtension,
SkeletonImage,
} from '@shopify/ui-extensions-react/checkout';

export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);

function Extension() {
return (
<SkeletonImage
inlineSize={300}
blockSize={300}
/>
);
}

Preview

Was this page helpful?