Skip to content

ElementHandle

Type@tryyoursize/react

What a ref on <SizeGuide>, <FitButton> or <FitElement> gives you.

interface ElementHandle
openvoidRequired

Opens the measuring window.

closevoidRequired
getElementTysElement | nullRequired

The underlying SDK element (null before mount).

getRecommendationPromise<Recommendation>Required

The shopper's recommended size once known.

const guide = useRef<ElementHandle>(null);
<SizeGuide ref={guide} product="SKU-123" />
<button onClick={() => guide.current?.open()}>Size help</button>

Was this page helpful?