Overview
By default, the Drop-in SDK applies Monite’s standard styling. However, you may want to customize this styling to better align with your website’s design or brand identity. While the fundamental layouts of these Monite components are immutable, you can customize other component properties like colors, fonts, borders, etc.Theming mechanism
To customize the components, pass your custom theme object using the theme prop on the MoniteProvider. The following snippet shows an example theme object with all possible options using default values:General
| Parameter | Type | Description |
|---|---|---|
borderRadius | number | Controls the border radius of UI components like buttons, cards, etc. |
spacing | number | Base spacing unit used throughout the UI (in pixels). |
colors
Color palette used throughout the UI.
| Parameter | Type | Description |
|---|---|---|
colors.primary | string | Main brand color for primary buttons, links, and highlights. |
colors.secondary | string | Secondary color for less prominent UI elements. |
colors.neutral | string | Neutral tone for borders, dividers, and subtle UI elements. |
colors.info | string | Informational color (e.g. badges, info alerts). |
colors.success | string | Success state indicators and confirmations. |
colors.warning | string | Warnings and attention-grabbing notifications. |
colors.error | string | Error states and destructive action indicators. |
colors.background | string | Main background color of the application. |
colors.text | string | Default primary text color. |
typography
Controls the font styling across the app.
| Parameter | Type | Description |
|---|---|---|
typography.fontFamily | string | Global font family. |
typography.fontSize | number | Base font size in pixels. Other text scales relative to this. |
Typography Variants
Each variant is an object with the following fields:fontSize, fontWeight, lineHeight.
| Variant | Description |
|---|---|
typography.h1 | Main page heading |
typography.h2 | Section heading |
typography.h3 | Subsection heading |
typography.subtitle1 | Primary subtitle |
typography.subtitle2 | Secondary subtitle |
typography.body1 | Primary body text |
typography.body2 | Secondary body text (smaller) |
Typography Variant Fields
| Field | Type | Description |
|---|---|---|
fontSize | number | Font size in pixels. |
fontWeight | number | Font weight (e.g., 400 = normal, 600 = bold). |
lineHeight | string | Line height in px. |