Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

SkeletonTextBlock

The skeleton text block component displays a placeholder representation of a block of text while it loads. Use skeleton text block to reserve space for paragraph-level content during loading states.

Optionally pass text content inside the component to use as a base for the rendered skeleton shape.

Support
Targets (25)

Configure the following properties on the SkeletonTextBlock component.

string

A unique identifier for the component. Use this to target the component in scripts or stylesheets, or to distinguish it from other instances of the same component.

Anchor to lines
lines
number
Default: 1

The number of text lines the skeleton renders when no children are provided. Use this to match the expected paragraph length of the content being loaded.

A keyword that sets the size of the skeleton to match the text it replaces. The size maps to the design system's type scale, ensuring the placeholder accurately represents the final content dimensions.


Anchor to Display a paragraph placeholderDisplay a paragraph placeholder

Reserve space for block-level text while content loads. This example renders a skeleton text block as a paragraph placeholder.

Display a paragraph placeholder

A skeleton text block component displaying a placeholder for paragraph content

Display a paragraph placeholder

import {
reactExtension,
SkeletonTextBlock,
} from '@shopify/ui-extensions-react/customer-account';

export default reactExtension(
'customer-account.page.render',
() => <Extension />,
);

function Extension() {
return <SkeletonTextBlock />;
}
import {extension, SkeletonTextBlock} from '@shopify/ui-extensions/customer-account';

export default extension('customer-account.page.render', (root) => {
const skeletonTextBlock = root.createComponent(SkeletonTextBlock);

root.appendChild(skeletonTextBlock);
});

  • Match expected content length: Provide representative text content to create an accurate skeleton.
  • Use for block content: For inline text placeholders, use SkeletonText instead.

  • Represents block-level text only. For inline text placeholders, use SkeletonText.

Was this page helpful?