✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Disguising Links to multi page

how do I disguise the links I create in a multi page app? I tried putting it into a header and then changing the text color:

 index_page = html.Div([
html.H2(
 dcc.Link('Go to Executive Overview', href='/eo'),
    style = {'color':'#000000'}),
html.Br(),
dcc.Link('PDM flow Schedule', href='/schedule')

but my link still comes out blue and underlined. This only increase the size of the text of my link. Is there a way to easily make the link appear as normal text without loading an external page of html/css?

style should work. Here’s an example:

image

import dash_core_components as dcc
import dash_html_components as html
import dash

app = dash.Dash()

app.layout = html.Div([
    dcc.Link('Unstyled Link', href="/page-1"),
    dcc.Link('Styled Link', href="/page-2", style={"color": "red", "text-decoration": "none"})
])


if __name__ == '__main__':
    app.run_server(debug=True)
1 Like

Thank you for the help!

is there any way to change the size of dcc.link, i tried with

style={"color": "red", "text-decoration": "none", "size":"20"}

it didn’t work.

In general, I believe that that should work.

In general, I recommend reading through the source code to better understand the markup: https://github.com/plotly/dash-core-components/blob/master/src/components/Link.react.js