Width of a custom component

How can I set a custom component width?
I’m following this blog post: How to build your own Streamlit component

Everything works great, within the IFRAME, the problem is, that I need my component to be a navbar like, so it needs to be fixed on top and 100% width and so on, but it seems It’s not possible? how can it set a iframe style in this method (used in the blog)?

Hey @BugzTheBunny,

Thanks for sharing this question! Unfortunately, I think the answer it’s not straightforward to create a fullscreen element because we generally want Streamlit apps to have a similar look/feel (here’s an old GitHub Issue on this topic).

That said, may be some hacks to accomplish this which other community members could share

Hi @Caroline and @BugzTheBunny

I was wondering if there was any follow-ups/work arounds/hacks for this. I’m hitting the same problem when trying to add a 100% width navigation bar. Thanks!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.