Migrate InlineSpacer
The previous InlineSpacer component has been removed. There's no direct replacement. Use <s-stack> with direction="inline" and the gap prop to create spacing between sibling elements.
Migrating InlineSpacer to stack
Latest (Preact)
import '@shopify/ui-extensions/preact';
import {render} from 'preact';
export default function extension() {
render(<Extension />, document.body);
}
function Extension() {
return (
<s-stack direction="inline" gap="large-200">
<s-text>Left</s-text>
<s-text>Right</s-text>
</s-stack>
);
}Pre-Polaris (2025-07)
import {
reactExtension,
InlineSpacer,
Text,
} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);
function Extension() {
return (
<>
<Text>Left</Text>
<InlineSpacer spacing="loose" />
<Text>Right</Text>
</>
);
}If you used Style.default().when() to make this property responsive, container queries replace the Style helper. Wrap your content in <s-query-container> and use @container syntax in the property value. Learn more in Migrate StyleHelper to container queries.
If you used Style.default().when() to make this property responsive, container queries replace the Style helper. Wrap your content in <s-query-container> and use @container syntax in the property value. Learn more in Migrate StyleHelper to container queries.
Anchor to Spacing valuesSpacing values
The previous InlineSpacer spacing values map to the Polaris stack gap token scale:
| Previous | New |
|---|---|
'none' | 'none' |
'extraTight' | 'small-400' |
'tight' | 'small-200' |
'base' | 'base' |
'loose' | 'large-200' |
'extraLoose' | 'large-500' |
The new token scale also adds 'small-500', 'small-300', 'small-100', 'small', 'large', 'large-100', 'large-300', and 'large-400'.
For more on the scale system, see Scale.