Hi,
I just created a custom component to easily link a button to a URL.
Do give it a try
pip install link-button
from link_button import link_button
link_button('Click Me!', 'https://docs.streamlit.io/en/stable/')
Hi,
I just created a custom component to easily link a button to a URL.
Do give it a try
pip install link-button
from link_button import link_button
link_button('Click Me!', 'https://docs.streamlit.io/en/stable/')
Hey this is awesome, no more Markdown links
are you able to edit the Wiki tracker here : Streamlit Components - Community Tracker with your component? So we can keep track of it!
Have a nice day
Fanilo
Love it!
Thanks for sharing @akshanshkmr
I love it, great work from streamlit
Hey @akshanshkmr
I was preparing a little Twittorial with the new components and wanted to test yours, but I’m getting an error from your app
Maybe you could you check what is happening ?
Have a nice day,
Fanilo
Hi @andfanilo,
The app should work now,
I had deleted it to make room for the newer components i made
Thanks for considering my component for the twittorial.
Thanks,
Akshansh
@akshanshkmr Is it possible to place it in sidebar? Similar to st.sidebar.*
components.
Hi @tejasvi88,
Sure you can do that with streamlit sidebar context.
from link_button import link_button
with st.sidebar:
link_button('test','')
Thanks,
Akshansh
@akshanshkmr pls am trying to deploy an app with this library. I keep getting error on streamlit cloud. what do you think is this problem
Hi @kareemrasheed89 ,
My components have been taken down from pypi for some time.
Sorry for the inconvenience
@akshanshkmr oooops… what other link button do you think i can use with streamlit, i need to solve a prob for a client
Dear Akshanshkmr,
i would like to use your package but pip install link-button doesn’t work.
Do you have an other way to use your function ?
I tried with markdown this in attached file. But it’s not working
Can you help me please
The result
Regards
Hey,
My components are taken down for some time
Sorry for the inconvenience
Thanks,
Akshansh
how to change the text color and background color?
not available though
any way I can access this?
Hey, Any follow up on when this would be available ?
Thank you very much
St button style markdown button:
def get_st_button_a_tag(url_link, button_name):
"""
generate html a tag
:param url_link:
:param button_name:
:return:
"""
return f'''
<a href={url_link}><button style="
fontWeight: 400;
padding: 0.25rem 0.75rem;
borderRadius: 0.25rem;
margin: 0px;
lineHeight: 1.6;
width: auto;
userSelect: none;
backgroundColor: #FFFFFF;
border: 1px solid rgba(49, 51, 63, 0.2);">{button_name}</button></a>
'''
st.markdown(get_st_button_a_tag('your link', 'button name'), unsafe_allow_html=True)
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.