You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to make a suggestion to improve the paper-card element. I think it would be great to make possible create a link to the image inside the element.
Suppose I'm using the paper-card to list options of products to be purchased, I would have to put the link to the product's details in the header or in a button and it would be great to be able to also put the link in the image of the product to make even easier to the user go the the products page.
I believe it wouldn't hard to make this change. Maybe create a element property like "image-link" so you can use it like:
I'd also like to support this idea. The current card action docs state:
The primary action area of a card is typically the card itself. Often cards are one large touch target to a detail screen on a subject.
When I look at how Google is currently using cards in the wild I often see an <a> tag wrapping everything or a good portion of everything in the card (title and image included). The href property of course containing the card's primary action URL.
Having a primary action URL seems like a really common use-case for cards, and wrapping everything but the supplemental actions in an <a> seems extremely useful.
It looks like we can currently wrap everything in the card-content div in an <a> when implementing a paper-card, but that still leaves the title and image link-less.
Maybe adding optional primaryActionHref and primaryActionTarget properties to paper-card would get the job done. When provided we could wrap the iron-image and title-text div in an <a href="primaryActionHref" target="primaryActionTarget"></a>. When not provided we'd just leave things linkless / as-is.
I would like to make a suggestion to improve the paper-card element. I think it would be great to make possible create a link to the image inside the element.
Suppose I'm using the paper-card to list options of products to be purchased, I would have to put the link to the product's details in the header or in a button and it would be great to be able to also put the link in the image of the product to make even easier to the user go the the products page.
I believe it wouldn't hard to make this change. Maybe create a element property like "image-link" so you can use it like:
<paper-card image="./images/image1.jpg" image-link="./products/[[computeProductLink(product)]]>
I hope this suggestion will be useful :)
The text was updated successfully, but these errors were encountered: