Button with Link?

Is it possible to use Button with Link?

For example:

dcc.Link("back", href=f"url")

works fine, but

html.Button(dcc.Link("back", href=f"url"), className='three columns'),

Will make the button appear to be like a link, but does not do anything when clicked.

Maybe try dcc.Link(html.Button('back'), href=...)? Alternatively, you can use CSS to style the <a/> tag that is embedded within dcc.Link as a button

1 Like