theme prop on the BorrowerDashboard 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 Borrower Dashboard.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

Level 2: Component Theme configuration
TheComponent level configuration will help you if you would like to get more specific about individual component styles. The Borrower Dashboard has a fairly repetitive UI so the components to configure with your own theme is somewhat minimal.
Available components
The following table details theComponents 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.
To update nested elements within a defined component, any valid CSS selector approach will work, however you will likely have to access the live DOM and inspect the HTML in your browser to determine how to construct the correct CSS selector. This is a fairly standard approach in FE development and one for now we don’t have any additional guidance on to make it easier.
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 theCommunications.PreapprovalLetter component. The available customization options are outlined below:
Level 3: Page Theme Configuration
When theGlobal 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 pre-approval task of the Borrower Dashboard. By utilizing Page level theming, you can target the Primary Button component on the “pre-approval task” of the Borrower Dashboard 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:-
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:
-
Container class: Within the Borrower Dashboard each page is split into 3 possible “containers” (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 3 containers:
-
Component class: The last step is to target the component you want to theme differently. Each component listed in the
Componentlevel also has a class name that is defined in kebab-case. For example,Typography.Titlewill 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 pre-approval task of the Borrower Dashboard, we need to gather up the following class names:- Page:
<body class="borrower-dashboard-preapproval-page">→borrower-dashboard-preapproval-page - Container:
<div class="action-container">→action-container - Component:
<div class="button-primary">→button-primary
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
- Start with Global - The global theme often covers most of your needs
- Use Component level for consistency - Apply component-level theming when you want consistent styling across all instances
- Use Page level sparingly - Reserve page-level theming for unique cases where you need page-specific customization
- Match your brand - Use your brand colors and fonts throughout
- Test thoroughly - Ensure all UI elements are readable with your color choices
- Maintain contrast - Follow WCAG guidelines for text contrast
Next steps
- Theme reference - Complete theme documentation
- Polling for updates - Monitor loan status changes
- Loan Application Element - For new applications