Customization
Mercury apps can be customized with a config.toml file placed in the active notebooks directory.
- If you start Mercury in a directory, put
config.tomlthere. - If you start Mercury with
--working-dir, Mercury loadsconfig.tomlfrom that working directory.
Basic app settings
Section titled “Basic app settings”[main]title = "Mercury"footer = "MLJAR - next generation of AI tools"favicon_emoji = "🎉"
[welcome]header = "Welcome"message = "Choose a notebook below."Available settings:
main.title- title shown in the app navbar and listing pagemain.footer- footer textmain.favicon_emoji- emoji used as the browser tab iconwelcome.header- optional welcome header on the notebook listing pagewelcome.message- optional welcome message on the notebook listing page
Theming
Section titled “Theming”Mercury uses a compact theme API. Most apps only need a few tokens in [theme], and Mercury derives the rest.
[theme]font = "Inter, ui-sans-serif, system-ui, sans-serif"font_size = "15px"background_color = "#f8fafc"surface_color = "#ffffff"text_color = "#0f172a"primary_color = "#2563eb"These core tokens affect the whole app:
- notebook listing page
- notebook app navbar
- sidebar
- widgets
- tables
- Markdown output
- loader and toasts
Core theme tokens
Section titled “Core theme tokens”font- base font stack for pages and widgetsfont_size- base UI font sizebackground_color- outer page backgroundsurface_color- cards, panels, widgets, and content surfacestext_color- main text colorprimary_color- primary accent and interactive color
Mercury derives many other values from these automatically, including:
- muted text
- borders
- focus color
- hover and selected states
- sidebar colors
- top navbar colors
- footer colors
- widget surfaces
- button and run button styling
Web fonts
Section titled “Web fonts”If you want to use a Google Font or another hosted stylesheet, add font_url.
[theme]font = "Inter, ui-sans-serif, system-ui, sans-serif"font_url = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap"background_color = "#f8fafc"surface_color = "#ffffff"text_color = "#0f172a"primary_color = "#2563eb"Notes:
fontonly sets the CSSfont-familyfont_urltells Mercury to load the stylesheet in the app pages- for Google Fonts, Mercury also adds the standard preconnect tags
Advanced overrides
Section titled “Advanced overrides”If you need more control, use [theme.overrides].
[theme]font = "IBM Plex Sans, ui-sans-serif, system-ui, sans-serif"font_size = "14px"background_color = "#0b1220"surface_color = "#111827"text_color = "#e5e7eb"primary_color = "#22c55e"
[theme.overrides]topbar_background_color = "#111827"topbar_text_color = "#f8fafc"sidebar_background_color = "#0f172a"sidebar_text_color = "#e5e7eb"focus_border_color = "#38bdf8"border_radius = "12px"Useful override keys:
accent_colorfocus_border_colorborder_colormuted_text_colorhover_background_colorselected_background_colortopbar_background_colortopbar_text_colortopbar_border_colorsidebar_background_colorsidebar_text_colorsidebar_title_colorfooter_background_colorfooter_text_colorwidget_background_colorcard_background_colorrun_button_backgroundrun_button_background_hoverrun_button_text_colorborder_radius
Examples
Section titled “Examples”Minimal
Section titled “Minimal”[main]title = "Mercury"footer = "Internal tools"favicon_emoji = "⚡"
[welcome]header = "Welcome"message = "Choose an app below."
[theme]font = "Inter, ui-sans-serif, system-ui, sans-serif"font_size = "15px"background_color = "#f8fafc"surface_color = "#ffffff"text_color = "#0f172a"primary_color = "#2563eb"Darkish
Section titled “Darkish”[main]title = "Ops Console"footer = "Platform Engineering"favicon_emoji = "🛠️"
[welcome]header = "Operations"message = "Run notebooks as internal apps."
[theme]font = "IBM Plex Sans, ui-sans-serif, system-ui, sans-serif"font_size = "14px"background_color = "#0b1220"surface_color = "#111827"text_color = "#e5e7eb"primary_color = "#22c55e"
[theme.overrides]accent_color = "#38bdf8"topbar_background_color = "#111827"topbar_text_color = "#f8fafc"sidebar_background_color = "#0f172a"sidebar_text_color = "#e5e7eb"sidebar_title_color = "#f8fafc"Editorial
Section titled “Editorial”[main]title = "Research Hub"footer = "Notebook publishing"favicon_emoji = "📘"
[welcome]header = "Research Apps"message = "Interactive notebooks with a calmer visual style."
[theme]font = "Source Serif 4, Georgia, serif"font_url = "https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;600;700;800&display=swap"font_size = "16px"background_color = "#fcfaf7"surface_color = "#fffdf9"text_color = "#2f241f"primary_color = "#b45309"
[theme.overrides]topbar_background_color = "#3f2d23"topbar_text_color = "#fff7ed"sidebar_background_color = "#f6efe7"sidebar_text_color = "#2f241f"sidebar_title_color = "#2f241f"What gets themed
Section titled “What gets themed”The theme is applied consistently across:
- notebook listing page
- notebook app navbar
- app sidebar
- text, number, select, multiselect, date, time, and datetime widgets
- tables
- Markdown output
- buttons, tabs, expanders, file upload, slider, checkbox, download
- loader and toast messages
Compatibility
Section titled “Compatibility”Mercury still accepts several older or alternative keys and normalizes them internally.
Examples:
backgroundColorsecondaryBackgroundColortextColorprimaryColoraccentColorsurfaceColorfontFamilyfontUrl
Legacy Mercury keys such as panel_bg, widget_background_color, or sidebar_background_color also continue to work.
Example files
Section titled “Example files”Example configs are available in the repository:
config.minimal.tomlconfig.darkish.tomlconfig.editorial.tomlconfig.google-font.toml
If something important is still not customizable enough, please open an issue.