# "ready" event

> The element is on the page (the size guide and button at once; the inline element once our window is connected).

Source: https://docs.tryyoursize.com/reference/web/event-ready/

*Event* · `@tryyoursize/sdk`

The element is on the page (the size guide and button at once; the inline element once our window is connected). Fires once per mount.

```ts
ready: { elementType: ElementType };
```

## Payload

- **`elementType`** (`"fit" | "button" | "sizeGuide"`, required): Which element.

## Example

**JavaScript**

```js
guide.on("ready", ({ elementType }) => console.log(elementType, "ready"));
```

**React**

```tsx
<SizeGuide product="SKU-123" onReady={() => setReady(true)} />
```

**HTML**

```html
el.addEventListener("tys:ready", (e) => console.log(e.detail.elementType));
```
