SDK Customizations - Default Design

Use the Default Design information when customizing the Yuno Web SDK. This approach is recommended for all new customizations and ensures you use the most up-to-date styles and practices.

Use the following links to navigate to the desired component:

Input

The following table lists the classes available for customizing the input element while using the Default Design:

CSS ClassDescription
.Yuno-fieldset__boxGeneral container for input fields.
.Yuno-input__contentContent area for input elements.
.Yuno-input__labelLabel for input elements.
.Yuno-input__baseBase styling for input elements.

The images below show how each class will affect the input element.

You can also customize the error warnings flagged by the interface. The following table lists the classes related to error warnings:

CSS ClassDescription
.Yuno-input__label .Yuno-input__label--errorLabel with error styling for input elements.
.Yuno-error-text-field__contentContainer for error message content.
.Yuno-error-text-field__error-iconIcon for error messages.
.Yuno-error-text-field__messageText for error messages.

The images below show how each class will affect the input element.

The following code block shows an example of how you can customize the input element. To use the following code, you need to add it to card when starting the SDK with yuno.startCheckout:

styles: `
  #root {
    .Yuno-fieldset__box {
      .Yuno-input__content {
        background: lavender;
        border-radius: 8px;
        .Yuno-input__base {
          background: lavender;
        }
      }
    }
    .Yuno-pan-secure-field .Yuno-fieldset__box.Yuno-fieldset__box--focus {
      border-color: darkviolet !important;
    }
  }
  `,

The following image shows the result of the customization:

Dropdown

The following table lists the classes available for customizing the dropdown element while using the Default Design:

CSS ClassDescription
.Yuno-fieldset__boxGeneral container for input fields.
.Yuno-select__contentContent area for select elements.
.Yuno-select__labelLabel for select elements.
.Yuno-select__button-combo-boxButton for combo box elements.
.Yuno-select__inputInput area for select elements.
.Yuno-select__arrowArrow icon for select dropdown.
.Yuno-select__list-boxContainer for dropdown list items.
.Yuno-select__list-itemIndividual item in dropdown list.

The images below show how each class will affect the dropdown element.

You can also customize the error warnings flagged by the interface. The following table lists the classes related to error warnings:

CSS ClassDescription
.Yuno-fieldset__box .Yuno-fieldset__box--errorContainer with error styling.
.Yuno-select__label .Yuno-select__label--errorLabel with error styling.
.Yuno-error-text-field__contentContainer for error message content.
.Yuno-error-text-field__error-iconIcon for error messages.
.Yuno-error-text-field__messageText for error messages.

The images below show how each class will affect the dropdown element.

The following code block shows an example of how you can customize the dropdown element:

.Yuno-fieldset__box {
  .Yuno-select__content {
    background: lavender;
    border-radius: 8px;
    border-bottom-right-radius: 0px;
    border-top-right-radius: 0px;
    .Yuno-select__input {
      background: lavender;
    }
    .Yuno-select__list-box {
      background: lavender;
    }
  }
}

The following image shows the result of the customization:

Checkbox

The following table lists the classes available for customizing the checkbox element while using the Default Design:

CSS ClassDescription
.Yuno-checkbox__contentContainer for checkbox elements.
.Yuno-checkbox__iconIcon for checkbox elements.
.Yuno-checkbox__textText for checkbox elements.

The image below shows how each class will affect the checkbox element.

The following code block shows an example of how you can customize the checkbox element:

.Yuno-checkbox__content {
  .Yuno-checkbox__text {
    color: white;
  }
}

The following image shows the result of the customization:

Button

The following table lists the classes available for customizing the button element while using the Default Design:

CSS ClassDescription
.Yuno-button .Yuno-modal-bottom__buttonClass to configure the pay button.

The image below shows how each class will affect the button element.

The following code block shows an example of how you can customize the button element:

.Yuno-button.Yuno-modal-bottom__button {
  background: cornflowerblue;
}

The following image shows the result of the customization:

Card

The following table lists the classes available for customizing the card element while using the Default Design:

CSS ClassDescription
.Yuno-front-side-card__contentClass to configure the card element content.

The image below shows how each class will affect the card element.

The code block below presents an example of how you can customize the card element. To use the following code, you need to add it to card when starting the SDK with yuno.startCheckout.

styles: `
  #root {
    .Yuno-front-side-card__content {
      background: darkslateblue;
    }
  }
`,

The following image shows the result of the customization:

Alert

The following table lists the classes available for customizing the alert element while using the Default Design:

CSS ClassDescription
.Yuno-AlertConfigure the alert container.
.Yuno-Alert__iconEnables you to change the alert icon.
.Yuno-Alert__messageText for the alert element.

The image below shows how each class will affect the alert element.

The following code block shows an example of how you can customize the alert element:

.yuno-modal-user-form {
  .Yuno-Alert {
    background-color: black;
    .Yuno-Alert__message {
      color: white;
    }
  }
}

The following image shows the result of the customization:

Modal

The modal element provides two options you can customize:

  • Form Card Modal
  • APM Modal

Modal customization requirements

To customize the modal component style, you must define the custom style directly within your web page.

Form Card Modal

Within the Form Card Modal, three iframes exist, where the card number input, expiration input, and CVV input are rendered separated. The name of the card owner is a standard input.

The classes available for customizing the form card modal element while using the Default Design are listed in the following table.

CSS ClassDescription
Yuno-modal__modal-contentContainer for the modal content.
Yuno-modal-header__contentHeader section of the modal.
Yuno-modal-header__iconIcon in the modal header.
Yuno-modal-header__titleTitle of the modal.
Yuno-modal-body__contentBody content of the modal.
Yuno-modal-bottom__contentBottom section of the modal.

The image below presents how each class will affect the form card modal element.

The code block below presents an example of how you can customize the form card modal element.

.Yuno-modal__modal-content {
  background: rgb(40, 42, 48) !important;

  & .Yuno-modal-header__title {
    color: white;
  }
  & .Yuno-modal-bottom__content .Yuno-yuno-brand__text {
    color: white;
  }
  & .Yuno-modal-bottom__content .Yuno-button {
    background: #35363e;
  }
  & .Yuno-modal-body__content .Yuno-checkbox__content .Yuno-checkbox__text {
    color: white !important;
  }
}

The following image shows the result of the customization:

APM Modal

The classes available for customizing the APM modal element while using the Default Design are listed in the following table.

CSS ClassDescription
.Yuno-modal__modal-contentContainer for the modal content.
.Yuno-modal-header__contentHeader section of the modal.
.Yuno-modal-header__iconIcon in the modal header.
.Yuno-modal-header__titleTitle of the modal.
.Yuno-modal-header__close-buttonClose button for the modal.
.yuno-user-form__heading .yuno-headingHeading for the user form.
.yuno-user-form__formForm container within the user form.
.Yuno-modal-body__contentBody content of the modal.
.Yuno-modal-bottom__contentBottom section of the modal.
.Yuno-button .Yuno-modal-bottom__buttonButton within the bottom section of the modal.
.Yuno-yuno-brand__contentContent area for Yuno brand.
.Yuno-yuno-brand__iconIcon for Yuno brand.
Yuno-yuno-brand__textText for Yuno brand.

The image below presents how each class will affect the APM modal element.

The code block below presents an example of how you can customize the APM modal element.

.Yuno-modal__modal-content {
  background: rgb(40, 42, 48) !important;
}

.Yuno-modal-header__content {
  .Yuno-modal-header__title {
    color: white;
  }
}

.Yuno-modal-body__content {
  .yuno-user-form__heading.yuno-heading {
    color: white;
  }
  .Yuno-Alert {
    background: #35363e;
    color: white;

    .Yuno-Alert__message {
      color: white;
    }
  }
  .yuno-terms-conditions {
    color: white;
  }
}

.Yuno-modal-bottom__content {
  .Yuno-button.Yuno-modal-bottom__button {
    background: darkslateblue;
  }
}

The following image shows the result of the customization: