Reputation: 120
From reviewing the dash documentation, I cannot see any syntax or examples for nesting a hyperlink within an image. I am essentially trying to achieve the following but in a dash layout friendly format (regardless of whether it uses html or dash-core-components):
<a href="https://www.twitter.com/username">
<img alt="Link to my twitter" src="twitterlogo.png"
width=32" height="32">
</a>
Appreciate any help in advance.
Upvotes: 2
Views: 4778
Reputation: 6616
I believe this will work:
html.A(
href="https://www.twitter.com/username",
children=[
html.Img(
alt="Link to my twitter",
src="twitterlogo.png",
)
]
)
Upvotes: 4