Cards

Flexible collections for ideas, articles, and everything worth sharing.

Installation

Run the source CLI from a Blocks UI checkout. This package is not published to npm.

node packages/cli/index.js add cards

Or copy the source files above. Include tokens.css and base.css once in your project.

Usage

Use the authored row-and-column structure, then let the standalone runtime discover and enhance the block.

<div class="cards">
  <div><div><span class="badge accent">Foundation</span><h3>HTML first.</h3><p>Content that works before JavaScript, and gets better with it.</p><a href="#architecture">Explore the architecture</a></div></div>
  <div><div><span class="badge">Your code</span><h3>Make it yours.</h3><p>Copy the source. Change every detail. Ship without a runtime dependency.</p><a href="#installation">See installation</a></div></div>
</div>
import decorate from './blocks/cards/cards.js';
document.querySelectorAll('.cards').forEach(decorate);

Variants

Choose a variant in the live preview. Add its class to the authored block.

defaulthorizontalcompact

Accessibility & behavior

Semantic HTML, visible focus states, shared contrast-aware tokens, and responsive styles provide an accessible foundation. Preserve labels and heading hierarchy when customizing.

Multiple instances are supported. Layouts adapt to smaller viewports. No npm dependencies are required at runtime.

AEM usage

Copy the canonical CSS and JavaScript into your EDS block folder. Use the same row-and-column authoring structure shown above and let your existing AEM loader call the default decorator.

Compatibility

Standalone verified. EDS markup compatible. Live AEM integration has not been verified.

Edit this example on GitHub

Search documentation

Search the docs, components, and blocks. Use Tab to select a result.