Integration Guides

Croissant Cart Radio Input Form

The Croissant Radio Input Form is a form element with two radio input options. This component is used to opt a cart in to Croissant

Required Attributes

cart

merchant-id

merchant-proxy-opt-in-url

placement

Custom CSS

CSS classes and variables can be used to customize the look and branding for the Radio Input Form.

The simplest and easiest way to customize the Radio Input Form is to use the Croissant Design Tokens.

Example

  <croissant-cart-radio-input-form
        merchant-id="58072236099"
        placement="pdp"
        pricing-url="https://api.retailer.croissant.com/v0/prices"
      ></croissant-cart-radio-input-form>
 const productList = [{ productId: "40872361885763", quantity: 1 }];

 const radioInputForm = document.querySelector("croissant-radio-input-form");

 radioInputForm.setAttribute("product-list", JSON.stringify(productList));
:root {
  --croissant-color--primary: orange;
}