Adding hyperlink to radio Options

I am trying to create a radio options as per<!-- --> - Streamlit Docs

I need to add hyperlinks to both Label and Options. I can sucessfully add hyperlink to Label, but adding hyerlink is not working with Options strings. I understand that the documentation link above do not say Links are supported for Options, so i don’t expect it to work by default.

But i am wondering it there any workaround to achieve this ?
If not, please you may consider this an enhancement request.

Here is sample code

link='check out this [link]('
st.session_state['database_name'] ="[Choose Database]( :" ,
                                "[Sales Content]( :",
                                 "Technical Content"))


Hi @Santhosh_M

Unfortunately, the options parameter does not support markdown links. However, the captions parameter does!

Consider the following code snippet:

import streamlit as st

genre =
    "What's your favorite movie genre",
    [":rainbow[Comedy]", "Drama", "Documentary :movie_camera:"],
    captions = ["Laugh out loud.", "Get the [popcorn](", "Never stop learning."])

which generates a clickable link as shown in the screenshot below:

Hope this helps!

Thanks for the workaround, this is great and helps.
Still if streamlit development team can add similar capability within Options, that would some real estate space on the GUI.

1 Like

Glad that it works now!

If you’d like to file for a feature request, you can do so at Issues Β· streamlit/streamlit Β· GitHub

Thanks I have submitted a feature request
# Provide a feature for markdown link for Options parameter in #7992

1 Like

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