Skip to main content

Simulation widget

By displaying this widget on your website, your customers will be able to calculate the monthly instalment amount and make well-informed purchasing decisions. You can combine this widget with the available conditions functionality provided by the library, to anticipate which products are available for a specific amount before rendering any widget.

info

Firstly, make sure to load and initialize the nemuru.js JavaScript library if you haven't already.

Display the Simulation widget

The widget is displayed in the web client's DOM by placing the nemuru-simulation web component. Widget configuration is done by passing the desired data through the component's attributes.

<nemuru-simulation
conditions-amount="32000"
conditions-product="instalments"
style-color="#3E6AE1"
style-variant="select_banner"
style-branding="default"
style="width: 100%"
></nemuru-simulation>
<nemuru-simulation
conditions-amount="32000"
conditions-product="split_pay"
style-color="#3E6AE1"
style-variant="text_banner"
style-branding="default"
style="width: 100%"
></nemuru-simulation>
<nemuru-simulation
conditions-amount="32000"
conditions-product="instalments"
style-color="#3E6AE1"
style-variant="text"
style-branding="default"
style="width: 100%"
></nemuru-simulation>

Parameter details:

FieldTypeRequiredDescriptionExample
conditions-amountstringRequiredThe amount to be financed in cents."32000"
conditions-productstringRequiredThe chosen financial product. Possible values are: instalments, split_pay."split_pay"
style-colorstringRequiredA valid HEX color that will be used to customize the widget, highlighting some elements of it."#34AEEB"
style-variantstringRequiredOne of several variants of the widget. Possible values are: text, select, text_banner, select_banner."text_banner"
style-brandingstringRequiredThis value will be provided by Nemuru. Depending on this value, one version of the widget or another will be displayed. This includes legal texts, distinct visual components, etc."your_branding"