# Card

> Flexible content card with mixed media and text for marketing tiles, editorial highlights, and feature callouts.

## Playground

An interactive playground for Card is embedded above. Open the canonical story on Storybook: [https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-card--default](https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-card--default)

## Overview

Card is a content container that pairs an image (or any media slot) with text: caption, heading, subline, description, icon, and an optional call-to-action. When you set `href`, the whole tile becomes a single click target.

Pick a variant by the role the card plays in the layout:

<table>
<thead>
  <tr>
    <th>
      <code>
        variant
      </code>
    </th>
    
    <th>
      When to use
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        'plain'
      </code>
    </td>
    
    <td>
      Borderless layout for editorial grids and mixed-media collections.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        'outline'
      </code>
    </td>
    
    <td>
      Soft border that gains a gradient ring on hover or focus. The standard interactive card.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        'haptic'
      </code>
    </td>
    
    <td>
      Elevated card with a shadow that deepens on hover. Best for hero placements that should feel tappable.
    </td>
  </tr>
</tbody>
</table>

Pass `aspectRatio` (`'16/9'`, `'4:3'`, or a numeric ratio) so card grids stay aligned across cards with different image dimensions.

Related content tiles:

- [`LinkTile`](/laioutr-ui/ui-kit/content/link-tile) — category-promoting tile with basic, compact, and big layouts.
- [`ProductTileBasic`](/laioutr-ui/shop/product-tile-basic) — the product-listing tile with pricing, swatches, and add-to-cart.

## Key Business & UX Benefits

- One component covers marketing tiles, feature callouts, and editorial highlights without per-block CSS or bespoke layouts.
- Three visual variants and a single `aspectRatio` prop keep card grids aligned and on-brand across breakpoints, even when imagery comes from different sources.
- Full-card click target with built-in hover and focus states improves usability on touch, mouse, and keyboard alike.
- Editors compose card blocks in Studio without dev help, so marketing teams ship campaigns faster.

<tip>

Pro-Tip from Larry: Set `aspectRatio` on every card in a grid so columns line up even when the images come from different sources.

</tip>

## Usage

#### Example: LCard

Live preview: [https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-card--default](https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-card--default)

## Feature List

<features :items="["Three variants ('plain', 'outline', 'haptic') for editorial grids, standard tiles, and tappable hero placements","Single aspectRatio prop keeps every card in a grid aligned across mixed-media sources","Full-card click target with built-in hover and focus states when href is set","Inline CardCta with its own variant, size, and icon props for tailored call-to-action treatment","Configurable in Studio (variants, copy, CTA, media) so marketing teams swap content without dev help","Themed via design tokens and a BEM root class for per-card overrides"]">



</features>

## API Reference

#### Props

```json
{"type":"object","properties":{"caption":{"type":"string","default":"void 0"},"heading":{"type":"string","default":"void 0"},"subline":{"type":"string","default":"void 0"},"description":{"type":["string","HtmlFragment"],"default":"void 0"},"variant":{"enum":["plain","outline","haptic"],"type":"string","default":"outline"},"media":{"type":"object","properties":{"type":{},"sources":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"Image provider to be used with NuxtImage.\n\nIf you know the provider, e.g. `cloudinary`, `directus`, `sanity`, etc., you can use it here for optimal image-serving.\nOtherwise, the `raw` provider is a good fallback for plain URLs.\n\nAlternatively you can create a custom provider and use that here."},"src":{"type":"string"},"origin":{"type":"object","properties":{"libraryId":{"type":"string","description":"Producing library's id (the `.mediaLibrary()` registration id, default `meta.app`)."},"externalId":{"type":"string","description":"The asset's stable id within that library (Shopify gid, Shopware media UUID), when the backend has one."}},"additionalProperties":false,"required":["libraryId"],"description":"Origin of this source (producing library + stable external id)."},"width":{"type":"number"},"height":{"type":["number","undefined"]},"responsive":{"enum":["static","mobile","desktop"],"type":"string","description":"The responsiveness-mode of this source.\n- `static`: Source can be used for all viewport-sizes.\n- `mobile`: Source is a mobile-optimized version of the image.\n- `desktop`: Source is a desktop-optimized version of the image.\n\nIf not given, `static` can be assumed."},"focalPoint":{"description":"Optional focal point of the image, as fraction of the width and height of the image.\nIn form [x, y], e.g. [0.5, 0.5] for center.\n\nIf not given, center can be assumed."}},"additionalProperties":false,"required":["provider","src"]},"description":"Each source is a different version of the same image. Differences may be:\n- mobile or desktop version\n- different file-formats"},"placeholder":{"description":"Optional placeholder for the image.\n\nIf not given, the image will be loaded as is. Otherwise, the placeholder will be displayed while the image is loading."},"alt":{"type":["string","undefined"]},"meta":{},"aiDisclosure":{"enum":["generated","modified"],"type":"string","description":"AI disclosure for this asset, when the producing backend told us one.\nAbsent means no disclosure is known — there is nothing to disclose. It is\nnot an assertion that the asset is human-made.\n\nSet it only from an authoritative backend signal; never infer it from a\nfilename or guess. Omission is the correct answer for an unknown asset.\n\nDescribes the depicted content, so it is identical across every responsive\nvariant and format — which is why it lives here and not on the sources. A\nvideo's `poster` and an audio's `cover` are themselves images and carry\ntheir own, independent disclosure."}},"additionalProperties":false,"required":["type","sources"],"default":"void 0"},"aspectRatio":{"type":["string","number"],"default":"void 0"},"icon":{"type":"string","default":"void 0"},"iconBackground":{"enum":["pale","solid"],"type":"string","default":"void 0"},"size":{"enum":["m","l"],"type":"string","default":"m"},"captionSize":{"description":"Typography size for the caption. Default mirrors the previous `textSize='m'` mapping (`'s'`).","enum":["s","m","xs","l","sm","xl","ml","2xl","3xl","4xl"],"type":"string","default":"s"},"headingSize":{"description":"Typography size for the heading. Default mirrors the previous `textSize='m'` mapping (`'ml'`).","enum":["s","m","xs","l","sm","xl","ml","2xl","3xl","4xl"],"type":"string","default":"ml"},"sublineSize":{"description":"Typography size for the subline. Default mirrors the previous `textSize='m'` mapping (`'m'`).","enum":["s","m","xs","l","sm","xl","ml","2xl","3xl","4xl"],"type":"string","default":"m"},"bodySize":{"description":"Typography size for the body / description block. Default `'s'` mirrors the previous hardcoded body size.","enum":["s","m","xs","l","sm","xl","ml","2xl","3xl","4xl"],"type":"string","default":"s"},"captionColor":{"description":"Optional CSS colour override for the caption (inherits from theme when unset).","type":"string","default":"void 0"},"headingColor":{"description":"Optional CSS colour override for the heading.","type":"string","default":"void 0"},"sublineColor":{"description":"Optional CSS colour override for the subline.","type":"string","default":"void 0"},"bodyColor":{"description":"Optional CSS colour override for the body / description.","type":"string","default":"void 0"},"textAlignment":{"enum":["center","start","end"],"type":"string","default":"start"},"headingAs":{"description":"HTML element used for the heading. Defaults to TextGroup's own default.","enum":["h1","h2","h3","h4","h5","h6","div"],"type":"string","default":"void 0"},"sublineAs":{"description":"HTML element used for the subline. Defaults to TextGroup's own default.","enum":["h1","h2","h3","h4","h5","h6","div","p"],"type":"string","default":"void 0"},"href":{"type":"string","default":"void 0"},"linkText":{"type":"string","default":"void 0"},"cta":{"type":"object","properties":{"text":{"type":"string"},"link":{"type":["string","undefined"]},"size":{"enum":["s","m","xs","l"],"type":"string"},"variant":{"enum":["primary","secondary","secondary-white","tertiary","ghost-black","ghost-white","glass-black","glass-white","positive","danger","subtle","close-black","close-white","info","adaptive-primary","adaptive-secondary","adaptive-ghost"],"type":"string"},"iconLeft":{"type":["string","undefined"]},"iconRight":{"type":["string","undefined"]}},"additionalProperties":false,"default":"void 0"}}}
```
