# Smootify.selectVariant()

> selects a variant (its number or gid) of a `smootify-product` of the page: the element, or one inside it; false when the product has no such variant

Status: Ready (Smootify 2.0)  
URL: https://www.smootify.io/docs/reference/api/methods/selectvariant  
Updated: 2026-10-13

selects a variant (its number or gid) of a `smootify-product` of the page: the element, or one inside it; false when the product has no such variant New in 2.0.

```ts
selectVariant(product: HTMLElement, variantId: string | number): boolean
```
