Next Commerce
Addon ToggleReference

CSS Classes & State Attributes

CSS Classes

These classes are applied to each card element automatically.

ClassApplied toWhen
next-toggle-cardEach registered cardAlways, on registration
next-in-cartA cardThe package is in the cart
next-not-in-cartA cardThe package is not in the cart
next-selectedA cardAlias for next-in-cart
next-loadingA cardDuring an async cart operation or price fetch

The same next-in-cart, next-not-in-cart, next-active, and os--active classes are also applied to the card's nearest state container when one is found. See State Containers.


Attributes Set Automatically

On each card element:

AttributeValuesWhen set
data-next-in-cart"true" / "false"Updated on every cart sync
data-next-loading"true" / "false"Set while a cart write or price fetch is in progress

On the state container (when one is found):

AttributeValuesWhen set
data-in-cart"true" / "false"Updated on every cart sync
data-next-active"true" / "false"Alias for data-in-cart

On this page