diff --git a/docs/hub/spaces-sdks-streamlit.md b/docs/hub/spaces-sdks-streamlit.md index afb6e3605..38d7301d1 100644 --- a/docs/hub/spaces-sdks-streamlit.md +++ b/docs/hub/spaces-sdks-streamlit.md @@ -82,4 +82,30 @@ For example, the demo above can be embedded in these docs with the following tag +## Embed Streamlit Spaces with auto-resizing IFrames + +Streamlit has supported automatic iframe resizing since [1.17.0](https://docs.streamlit.io/library/changelog#version-1170) so that the size of the parent iframe is automatically adjusted to fit the content volume of the embedded Streamlit application. + +It relies on the [`iFrame Resizer`](https://github.com/davidjbradshaw/iframe-resizer) library, for which you need to add a few lines of code, as in the following example where + +- `id` is set to ` + + +``` + Additionally, you can checkout [our documentation](./spaces-embed).