molecules
Card
The base card, with a media figure, a body of heading, byline, and link, and optional metadata and video.
Specimens

James Zabiela
Connecting a World-Famous DJ with His Fans
Winner of Best Music Site at SXSW.
{{ Card.render({
title: "Connecting a World-Famous DJ with His Fans",
byline: "James Zabiela",
description: "Winner of Best Music Site at SXSW.",
url: "/work/",
meta: [
{
key: "Deliverables",
value: "Development, Interaction Design"
}
],
image: (collections.projects | filterByKey("slug", "connecting-a-world-famous-dj-with-his-fans") | first).featuredImage
}) }}Connecting a World-Famous DJ with His Fans
{{ Card.render({
title: "Connecting a World-Famous DJ with His Fans",
url: "/work/",
headingLevel: 4,
image: (collections.projects | filterByKey("slug", "connecting-a-world-famous-dj-with-his-fans") | first).featuredImage,
video: (collections.projects | filterByKey("slug", "connecting-a-world-famous-dj-with-his-fans") | first).featuredVideo
}) }}Params
| Param | Type | Description |
|---|---|---|
title | string | Heading text. Also the image alt fallback. |
headingLevel | number | Heading level. Defaults to 3. |
byline | string | Small text rendered above the heading. |
description | string | Visually hidden description (sr-only). |
meta | array | Rows of { key, value } passed to the stats molecule. Omitted when empty. |
image | object or string | Sanity image (asset.url, asset.metadata.dimensions, alt), an object with src or url, or a URL string. Used as the media when there is no video. Width and height come from its dimensions. |
video | object | Optional. url (or videoUrl) plus poster.url. Replaces the image as the media; the image is the poster fallback. muted, loop, and autoplay are on unless set to false. |
url | string | Adds a “View” link in the footer. |
eager | boolean | Loads the image eagerly. Defaults to false (lazy). |
classes | string | Appended as-is to the root <article>. No classes filter. |
styles | object | Slot map. See the slot table. |
| Slot | Element |
|---|---|
image | The media element: <img>, or <video> when video is set. |
Notes
The description and metadata are visually hidden (sr-only).