# "size" event

> The shopper chose a size in our window ("Use this size"): preselect that variant.

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

*Event* · `@tryyoursize/sdk`

The shopper chose a size in our window ("Use this size"): preselect that variant.

```ts
size: SizeEvent;
```

## Payload

- **`product`** (`string`, required)
- **`size`** (`string`, required)
- **`verified`** (`boolean`, required): True when the size comes from a completed try-on on the shopper's body.

## Example

**JavaScript**

```js
guide.on("size", ({ product, size }) => {
  if (product === currentSku) sizePicker.value = size;
});
```

**React**

```tsx
<FitButton product="SKU-123" onSize={({ size }) => setSize(size)} />
```

**HTML**

```html
el.addEventListener("tys:size", (e) => (sizePicker.value = e.detail.size));
```
