Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: the possibility of creating an link to the iron image of the element #72

Open
felpsio opened this issue May 12, 2016 · 2 comments

Comments

@felpsio
Copy link

felpsio commented May 12, 2016

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 :)

@mikeraagas
Copy link

+1

@chrisolof
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants