Skip to main content

AddToCartButton

Adds products to Shop's cart with checkmark animation feedback. Users can continue shopping and add more items before checkout. Use this for browsing experiences where customers might want multiple products. For immediate single-product purchases, use BuyNowButton instead.

Anchor to productVariantId
productVariantId
string
required

The GID of the product variant. E.g. gid://shopify/ProductVariant/456

Anchor to className
className
string

CSS class name

Anchor to disabled
disabled
boolean

Whether the button is disabled

Anchor to discountCodes
discountCodes
string[]

The discount codes to apply to the cart

Anchor to product
product

The product to add to the cart

'default' | 'sm' | 'lg'

Button size variant


Was this page helpful?