Product and variant hooks

This guide provides a list of the product and variant hooks offered in Hydrogen.

Product and variant

Products are the goods, digital downloads, services, and gift cards that a merchant sells. If a product has options, like size or color, then merchants can add a variant for each combination of options.

Each combination of option values for a product can be a variant for that product. For example, a t-shirt might be available for purchase in blue and green. The blue t-shirt and the green t-shirt are variants.


Hydrogen includes the following product and variant hooks:

Hook name Description
useProduct Returns the product object of the nearest ProductProvider.
useProductOptions Returns an object that enables you to keep track of the selected variant and/or selling plan state, as well as callbacks for modifying the state.