Pricing Card
A single pricing tier with a feature list, price and call to action.
6 个框架初级
A photo card with a gradient scrim, text laid over it and a hover zoom.
<a class="overlay-card" href="#">
<img class="overlay-card__image" src="/your-image.jpg" alt="" width="384" height="288" />
<!-- The scrim is what makes white text legible over an unknown photo. -->
<span class="overlay-card__scrim" aria-hidden="true"></span>
<span class="overlay-card__content">
<span class="overlay-card__kicker">Field notes</span>
<span class="overlay-card__title">Three weeks above the tree line</span>
</span>
</a>| Prop | 类型 | 默认值 | 说明 |
|---|---|---|---|
title必填 | string | - | 卡片的标题文本。 |
kicker | string | - | 显示在标题上方的小标签。 |
href必填 | string | - | 卡片链接到的目标地址。 |
imageSrc必填 | string | - | 卡片配图的图片 URL。 |
imageAlt | string | '' | 图片的替代文本。若 title 已说明图片内容则留空。 |
className | string | - | 合并到根元素上的额外类名。 |
The scrim is not decoration - it is the only thing guaranteeing white text stays readable over a photo you have not seen. Lightening `from-black/85` is the first thing that breaks contrast, so check it against your darkest and lightest images. The zoom lives on the image inside an `overflow-hidden` wrapper and is cancelled by `motion-reduce`; focus triggers the same zoom as hover, so keyboard users get the same affordance.