Skip to content

Commit

Permalink
Update desktop/README.md describing the embed mode config (#587)
Browse files Browse the repository at this point in the history
  • Loading branch information
whitphx authored Jul 5, 2023
1 parent 8265dcf commit 920a1d1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion packages/desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Convert your [Streamlit](https://streamlit.io/) application into a desktop app w
}
},
"devDependencies": {
"@stlite/desktop": "0.34.0",
"@stlite/desktop": "0.36.0",
"cross-env": "^7.0.3",
"electron": "^25.2.0",
"electron-builder": "^24.4.0"
Expand Down Expand Up @@ -56,6 +56,21 @@ Convert your [Streamlit](https://streamlit.io/) application into a desktop app w
To make your app secure, be sure to use the latest version of Electron.
This is [announced](https://www.electronjs.org/docs/latest/tutorial/security#16-use-a-current-version-of-electron) as one of the security best practices in the Electron document too.

## Hide the toolbar, hamburger menu, and the footer

If you want to hide the toolbar, hamburger menu, and the footer, add the following to your `package.json` file and run the `dump` command again. By adding the `stlite.desktop.embed` field, the dumped Streamlit app will work in the [embed mode](https://docs.streamlit.io/streamlit-community-cloud/get-started/embed-your-app#embedding-with-iframes) which hides the toolbar, hamburger menu, and the footer.

```json
{
// ...other fields...
"stlite": {
"desktop": {
"embed": true
}
}
}
```

## Limitations

- Navigation to external resources like `st.markdown("[link](https://streamlit.io/)")` does not work for security. See https://github.com/whitphx/stlite/pull/445 and let us know if you have use cases where you have to use such external links.

0 comments on commit 920a1d1

Please sign in to comment.