Skip to main content

TextBlock

Text block is used to render a block of text that occupies the full width available, like a paragraph.

Size of the text

Use to emphasize a word or a group of words.

Extract< , 'accent' | 'subdued' | 'info' | 'success' | 'warning' | 'critical' >

Changes the visual appearance

Align text along the main axis.

string

A unique identifier for the component.

Was this section helpful?

Basic TextBlock

import {
render,
TextBlock,
BlockStack,
} from '@shopify/checkout-ui-extensions-react';

render('Checkout::Dynamic::Render', () => <Extension />);

function Extension() {
return (
<BlockStack>
<TextBlock>
We have a 30-day return policy, which means you have 30 days after
receiving your item to request a return.
</TextBlock>
<TextBlock>
To be eligible for a return, your item must be in the same condition
that you received it, unworn or unused, with tags, and in its original
packaging. You’ll also need the receipt or proof of purchase.
</TextBlock>
</BlockStack>
);
}

Preview

ValueDescription
"accent"Conveys emphasis and draws attention to the element.
"subdued"Conveys a subdued or disabled state for the element.
"info"Conveys that the element is informative or has information.
"success"Convey a successful interaction.
"warning"Convey something needs attention or an action needs to be taken.
"critical"Conveys a problem has arisen.
Was this section helpful?

  • Create contrast between more and less important text with properties such as size, emphasis, and appearance.
Was this section helpful?