Skip to main content

Card Deck component

The card deck component controls the display of cards. Cards are the only components that should be placed within a card deck.

Components you might want to use with this one:

Design options

The card deck controls how cards are displayed on a live web page:

  • Equal height adjusts all cards in a group so they appear with the same height regardless of image size and the amount of text.
  • Masonry displays cards according to their natural heights. Use masonry when cards have images of different sizes, such as artwork or book covers.

You can specify how many columns appear on desktop, tablet and mobile:

  • Desktop (2-5 columns)
  • Tablet (1-2 columns is recommended)
  • Mobile (1 column is recommended)

Card decks can be used with any page layout. They must be placed within grid containers when using the full window template.

Screenshot of card deck component

Guidelines

All cards must be placed within a card deck.

In most cases, equal height is appropriate. Use masonry when your images are different sizes, such as book titles or artwork. Masonry should be at least three columns wide and two rows deep (for a total of at least six cards).

Examples & use cases

Equal height

These cards have titles and body text of different lengths, yet they display with an equal height. In addition to the title and body text, each card also includes a category, subtitle and button in the simple style.

Equal height displays the cards from left to right in the order they appear when editing in AEM.

Equal height card #1

Beachy bliss
Browse beach vacations

Equal height card #2

Canyon contentment
Book a canyon tour

Equal height card #3 with a lengthy title on three lines

Forest fun
Join a guided hike

Masonry

Each card only has an image and a title; the images are different heights and orientations. There are no buttons, therefore the entire card is a link.

Masonry displays the cards by column. Note the order of the numbered cards in the example: the first, second and third cards (when editing in AEM) are in the first column; the fourth card is at the top of the second column.

You may want to reorder your cards a few times to find the best display for your content.

Helpful tips

When editing in AEM, the cards will appear in a vertical stack.

To see how your card deck will look on the published page, you can preview your AEM page. While working in AEM, simply add ?wcmmode=preview to the end of your URL in your browser's address bar and press enter.

When you want to edit again, click the back button or remove the added text from the address bar.

Screenshot of address bar in Preview mode

Training

Cards and card decks are covered in the Heroes and Cards training sessions. This training is reserved for units whose websites use this component.

Need support?

The Web team is here to help.

© Concordia University