Skip to main content
The Loan Application Element is built with a strong emphasis on visual customization, giving you straightforward tools to adjust the overall look and feel you can offer to your users. The goal here is to create a single unified user experience between the Loan Application (the embedded application) and your application (the embedding application). You can customize the theme of the Loan Application by providing a theme prop on the Loan Application Element:

Theming approach

The theming approach is broken into 3 levels: To apply theming at each of the 3 levels, you can specify different configuration on each of the level’s named properties on the configuration object. The Global and Component levels exist as named properties at the root level, whereas the Page level exists at the root level as well as inside of a defined Component at the root level:
We offer the Page property at both levels to help you organize your styles to suit your own needs-there is no right or wrong way.
The theme is a completely optional prop at each of the 3 levels. If you’re using TypeScript, the type for it exists as Theme and will give you type ahead and feedback regarding type issues when you’re creating it.While we don’t advise it, any invalid properties or values in the theme configuration will simply be ignored and cause no issues to the functionality of the Loan Application.

Level 1: Global Theme configuration

Depending on your use case, the global option may be all that’s needed. This hits all of the typical global elements and follows patterns similar to other design frameworks that you may already be familiar with.

Global theme properties

The following table details which configurations are available at the global level:

Complete global theme example

The following image shows an example of what the global theme properties will target: Loan Application Global Theme Example

Level 2: Component Theme configuration

The Component level configuration will help you if you would like to get more specific about individual component styles. The Loan Application has a fairly repetitive UI so the components to configure with your own theme is somewhat minimal.

Available components

The following table details the Components available to customize:

Customizing components

Our design system is built using Material UI Components. All of the components we offer a theming API for (with the exception of the PreapprovalLetter PDF) hook into the flexibility of Material UI allowing you to override any CSS with your own. To do this styling the parent may be all you need but at times you’ll need to inspect the elements console in the browser and find the relevant child .Mui* classes you need to hit.
In an effort to make this synonymous with native CSS, there are no predefined opinions or standards built around what you should or should not change. We leverage the CSS in JS approach which allows you to apply any type of valid CSS you would like to any component and we will apply it directly (This includes nesting the CSS Object to target child elements in your parent selector).
The following images give a visual example of each component listed above: Loan Application Components Example

Customizing the Preapproval Letter

The preapproval letter’s customization options are somewhat limited due to its PDF format. However, you can customize some of its styles by configuring fields within the Communications.PreapprovalLetter component. The available customization options are outlined below:

Level 3: Page Theme Configuration

When the Global and Component level theming fall short of meeting your specific needs, we offer the option of Page level theming. With Page level theming, you gain the ability to focus on components within particular pages and apply distinct themes as necessary. For instance, consider a hypothetical scenario where this approach could prove useful: A “Submit Button” on the final page of the Loan Application. By utilizing Page level theming, you can target the Primary Button component on the “completed page” of the Loan Application and adjust its appearance by making it larger or maybe enhancing the text’s boldness. This functionality should cover any unique branding requirements that come up.

Creating a custom CSS selector

To achieve this customization, your first step involves creating a CSS selector to target specific components or groups of components on a given page. This selector process comprises three parts:
  1. Page class: We attach a unique class to the <body> element of each page, this is used as your root CSS selector. To find this class you’ll need to navigate to the specific page you want to make a change on and copy the name of the class on the <body> element from the browser dev console. See the example below of a unique class on the <body> element: Loan Application Body Class
  2. Container class: Within the Loan Application each page is split into 4 possible “containers” (Progress Container, Title Container, Form Container and Action Container), so the next step is to locate the “container” in the page where your component lives, the name of the class of this container will be used as the direct child of your root selector you copied from the <body> element. See the image below detailing the 4 containers: Loan Application Sections
  3. Component class: The last step is to target the component you want to theme differently. Each component listed in the Component level also has a class name that is defined in kebab-case. For example, Typography.Title will be <h1 class="typography-title"> and this is the same for each Component. This class name will be the next direct child in your CSS selector after the container class you found in step 2.

Component class names

Page-level theming example

Continuing with the hypothetical example of updating the submit button on the final page of the loan application, we need to gather up the following class names:
  • Page: <body class="loan-application-completed-page"> → loan-application-completed-page
  • Container: <div class="action-container"> → action-container
  • Component: <div class="button-primary"> → button-primary
It’s now possible to piece together the CSS selector and make the desired theming update to a component on this specific page:
In an effort to offer more than one way to organize Page level theming, it’s also possible to put the Page level theming at the root of the theming configuration. You can put as many Page level theming updates as you would like here:
If for some reason you have Page level theming defined at the root level as well as the Component level, the Component level will take precedence if they target the same component.Our selector approach is only a suggestion, there may be scenarios that it needs to be altered. It’s no problem to create your own selectors, the CSS passed in on the Page property is attached to the head of the page so as long as the selector works the CSS will be applied.

Complete theme example

The following is an example of a theme configuration using all 3 levels. As mentioned earlier, the theming config is purely optional at each level so this is just for reference.

Best practices

  1. Start with Global - The global theme often covers most of your needs
  2. Use Component level for consistency - Apply component-level theming when you want consistent styling across all instances
  3. Use Page level sparingly - Reserve page-level theming for unique cases where you need page-specific customization
  4. Match your brand - Use your brand colors and fonts throughout
  5. Test thoroughly - Ensure all form elements and buttons are readable with your color choices
  6. Maintain contrast - Follow WCAG guidelines for text contrast

Next steps