This component renders text. Remember, you can also add your own styling.
import {render, Text, BlockStack} from '@shopify/ui-extensions-react/admin';
render('Playground', () => <App />);
function App() {
return (
<BlockStack inlineAlignment="center" gap>
<Text fontWeight="bold">Name:</Text>
<Text>Jane Doe</Text>
</BlockStack>
);
}
import {extend, Text, BlockStack} from '@shopify/ui-extensions/admin';
extend('Playground', (root) => {
const text = root.createComponent(BlockStack, {inlineAlignment: 'center', gap: true}, [
root.createComponent(Text, {fontWeight: 'bold'}, 'Name:'),
root.createComponent(Text, {}, 'Jane Doe'),
]);
root.appendChild(text);
});
Provide semantic meaning to content and improve support for assistive technologies.
Use to emphasize a word or a group of words.
Set all the variants for a font with a shorthand property.
Sets the weight (or boldness) of the font.
A unique identifier for the field.
Set how hidden overflow content is signaled to users.
'address' | 'deletion' | 'mark' | 'emphasis' | 'offset' | 'strong'
'italic' | 'normal'
'numeric' | 'all-small-caps' | 'none'
'light-300' | 'light-200' | 'light-100' | 'light' | 'base' | 'normal' | 'bold' | 'bold-100' | 'bold-200' | 'bold-300'
'ellipsis'