Stlite supports the standard Streamlit configuration system, including themes, toolbar visibility, and client behavior flags. There are two ways to apply configuration: theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/whitphx/stlite/llms.txt
Use this file to discover all available pages before exploring further.
streamlitConfig option on mount() (or the equivalent <app-file name=".streamlit/config.toml"> child element) and a mounted config.toml file. Both approaches are equivalent and can be combined.
The streamlitConfig option
Pass a flat JavaScript object to streamlitConfig where each key is a dot-separated Streamlit configuration path — the same identifier you would use as a -- flag with streamlit run — and the value is a string, number, or boolean.
Common streamlitConfig keys
| Key | Type | Description |
|---|---|---|
theme.base | "light" | "dark" | Base color scheme for the app. |
theme.primaryColor | string | Hex color used for interactive elements. |
theme.backgroundColor | string | Main background color. |
theme.secondaryBackgroundColor | string | Background color of sidebars and secondary containers. |
theme.textColor | string | Default text color. |
client.toolbarMode | "auto" | "developer" | "viewer" | "minimal" | Controls visibility of the top-right toolbar. |
client.showErrorDetails | boolean | When false, hides detailed Python tracebacks from end users. |
Alternative: .streamlit/config.toml file
You can achieve the same result by mounting a standard Streamlit config.toml file at .streamlit/config.toml in the virtual file system. This is particularly convenient with the <streamlit-app> custom element.
Custom Pyodide distribution (pyodideUrl)
By default Stlite loads Pyodide from the official jsDelivr CDN. If your deployment environment has a restrictive content security policy or limits outbound CDN access, you can host Pyodide yourself and point Stlite at it via the pyodideUrl option.