Theming
Screens take three Theme settings:
| Setting | Values | Notes |
|---|---|---|
colorMode |
light, dark, system |
system follows the viewer’s OS setting. |
primaryColor |
Any CSS color, e.g. #1f3d2b |
Applied only when secondaryColor is also set. |
secondaryColor |
Any CSS color | Applied only when primaryColor is also set. |
Settings layer like this. Each level overrides the one before it:
-
Your default. Set it once in the dashboard. It applies to every Session.
-
Per Session. Pass
themewhen you create the Session:{"screens": ["employer-dashboard"],"employer": { "externalId": "acct_8812" },"theme": { "primaryColor": "#1f3d2b", "secondaryColor": "#f4f1ea" }} -
Per embed, color mode only. Use the
color-modeattribute (colorModein React) to follow your app’s dark mode as it changes:<FriendlyPayrollclientSecret={secret}screen="employer-dashboard"colorMode={theme}/>
Changing color-mode reloads the Screen.