PrimitivesView source

Card

A simple surface for content that belongs together.

Installation

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

node packages/cli/index.js add card

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

Usage

Use semantic HTML and the shared foundation styles. Interactive primitives also export a decorate function.

<article class="card"><span class="badge accent">Getting started</span><h3>A place for your next idea.</h3><p class="muted">A simple container for content that belongs together.</p><a class="button-secondary" href="#get-started">Explore the docs</a></article>

Variants

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

default

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

Primitives belong inside authored blocks, not as nested EDS blocks. Copy their styles and markup into the parent block implementation.

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.