element.update()
Changes the element’s options in place. A new product (or demo body) reloads the element; variant and label restyle it.
update(options: Partial<ElementOptions>): void;Parameters
Section titled “Parameters”optionsPartial<ElementOptions>RequiredProperties
productstringRequiredYour product ID or SKU, as synced to TryYourSize.
variant"link" | "button"Optional"sizeGuide" only: a text link (default, like most stores' "Size guide") or an outlined button.
labelstringOptional"sizeGuide" only: your own words for "Size guide" (otherwise localized from locale).
demoDemoOptionsOptional"fit" only, test keys only: demo mode. The element shows the garment on a named sample body (synthetic size-chart tape values, never a real person's), with no sign-in: size chips, objective numbers in cm and kPa, a turning body and a sample-body picker. For landing pages and sales demos.
Properties
bodystringRequiredA sample body id: sample-female-158, sample-female-165, sample-female-172, sample-male-172, sample-male-178 or sample-male-186.
heightnumberOptionalHeight of the element in px (default 640).
Examples
Section titled “Examples”A variant page that switches product
Section titled “A variant page that switches product”colorSelect.addEventListener("change", () => guide.update({ product: colorSelect.value }));// Changing the prop calls update() for you:<SizeGuide product={selectedSku} />Was this page helpful?
Thank you. We read every answer.