Unable to display button using components

I m having problem with display of button when i use streamlit components. I have the javascript option enabled on my browser.

I’m using python 3.7, streamlit 0.71, node v10.15.1, npm 6.4.1.

I observe that the html is embedded in the iframe but cannot see the button being displayed.

Here is the reference that i’m trying to follow.

I’m basically trying to embed google sign in button to my web app to authenticate users. It has platform.js library embedded in the html page.

Please let me know if there are any issues that i need to resolve.

Hey @Konchada_Srinivas and welcome to the forum! :wave:

Try checking the height of the iframe. If it’s 0, calling Streamlit.setFrameHeight should solve the issue. If that’s not the reason, please post some code - and I’ll try to be more helpful. :slight_smile:

And thanks for using Streamlit!

Hey @kantuni thanks for the prompt response.

As i have mentioned earlier am trying to integrate google sign in option into my Streamlit web app. I have the google sign in code in a html file which i m trying to render using the components.

for some reason i can not see the sign in button but if i just open the file. I can see and work on it.


My task is to authenticate users using the google Oauth so it should prompt for sign in and then the users will be able to access the actual application.

Here is my code.

import codecs

import streamlit as st

import streamlit.components.v1 as components

from PIL import Image

my_file = codecs.open("index.html", "r", "utf-8")

login = my_file.read()


def main():

    menu = ["Home", "Invoice Lookup", "Admin"]

    choice = st.sidebar.selectbox("Please select the below menu option",menu)

    if choice == "Home":



    elif choice == "Invoice Lookup":

        st.subheader("Invoice Lookup")




if __name__ == '__main__':


Kindly suggest me the best solution to achieve this.