element.update()
Esta página aún no está disponible en tu idioma.
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>ObligatorioPropiedades
productstringObligatorioYour product ID or SKU, as synced to TryYourSize.
variant"link" | "button"Opcional"sizeGuide" only: a text link (default, like most stores' "Size guide") or an outlined button.
labelstringOpcional"sizeGuide" only: your own words for "Size guide" (otherwise localized from locale).
demoDemoOptionsOpcional"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.
Propiedades
bodystringObligatorioA sample body id: sample-female-158, sample-female-165, sample-female-172, sample-male-172, sample-male-178 or sample-male-186.
heightnumberOpcionalHeight 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} />¿Te ha resultado útil esta página?
Gracias. Leemos todas las respuestas.