A Tag is used to help label, organize or categorize objects. It is commonly used in Checkout to display the discounts applied to a cart.
import {render, Tag} from '@shopify/checkout-ui-extensions-react';
render('Checkout::Dynamic::Render', () => );
function Extension() {
return SPRING ;
}
import {extend, Tag} from '@shopify/checkout-ui-extensions';
extend('Checkout::Dynamic::Render', (root) => {
const tag = root.createComponent(Tag, {icon: 'discount'}, 'SPRING');
root.appendChild(tag);
});
Icon source
A label used for buyers using assistive technologies. When set, any `children` supplied to this component will not be announced to screen reader users.
Callback when tag is removed
A unique identifier for the component.
'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowUpRight' | 'arrowDown' | 'bag' | 'calendar' | 'camera' | 'caretDown' | 'cart' | 'checkmark' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'chevronDown' | 'clock' | 'close' | 'critical' | 'delete' | 'delivered' | 'delivery' | 'disabled' | 'discount' | 'email' | 'error' | 'errorFill' | 'external' | 'filter' | 'geolocation' | 'gift' | 'giftFill' | 'grid' | 'hamburger' | 'hollowCircle' | 'horizontalDots' | 'info' | 'infoFill' | 'list' | 'lock' | 'magnify' | 'map' | 'marker' | 'minus' | 'mobile' | 'note' | 'orderBox' | 'pen' | 'plus' | 'profile' | 'question' | 'questionFill' | 'reorder' | 'return' | 'store' | 'success' | 'truck' | 'verticalDots' | 'warning' | 'warningFill'