Vouchers Element
Overview
The Vouchers Element shows a list of vouchers that can be redeemed by the user. The user can activate or deactivate vouchers.
Using the Vouchers Element
To include a Vouchers Element on a webpage do the following:
- Add the following script tags at the top of the page
<script type="module" src="https://elements.spaaza.com/elem/spaaza-environment.js"></script>
<script type="module" src="https://elements.spaaza.com/elem/spaaza-vouchers.js"></script>
- Add the Environment tag to the contents of the page (below the script tags). Include the Vouchers Element within the Environment tag.
<spaaza-environment config="your_config_goes_here">
<spaaza-vouchers type="raised"></spaaza-vouchers>
<!-- other Spaaza Elements and HTML goes here -->
</spaaza-environment>
Element Properties
The following properties can be passed to the Vouchers Element.
Property | Description |
---|---|
loading (optional) | By default a single campaign list item is shown as loading while waiting for a response from the Spaaza API. More can be shown by specifying the required number. To show no loading campaigns set the value to 0. |
direction (optional) | Determines the direction the campaign promotions will rendered on the page. There are three options: “row”, “row-wrap” or “column”. The default direction is “row-wrap” |
appearance (optional) | Determines the card display style. There are two options: “flat” or “raised”. The default is “raised”. |