Skip to main content

Card Carousel

JSThis component requires JavaScript.
The Card Carousel displays a set of related Cards that users can navigate through horizontally.

The Card Carousel component organizes multiple cards into a horizontally navigable container. It displays related content such as articles, programs or promotional items without overwhelming the page layout.

Examples

Default

Usage

Dos

  • Use with 5 or more Cards
  • Limit the number of Cards to a manageable set (e.g. 5-8 items).
  • Establish consistency among the Cards by including the same elements within each Card (e.g. If one Card has an image, all Cards should include an image.)
  • Group cards in a carousel by related content.
  • Write copy within Cards to maintain similar, concise lengths. Card heights are similar within the set.

Don'ts

  • Do not use carousels to navigate to crucial calls-to-action. A user may not discover all items in the carousel and therefore overlook crucial options.
  • Do not overload the carousel with an excessive amount of Cards.
  • Do not overload Cards with excessive text.
  • Do not auto-rotate content in the carousel; this takes away control from the user.

Implementation notes

Because the carousel is a collection of Card components, all Card implementation notes apply to the items within the carousel.

The carousel fills the width of its container and uses breakpoints to determine the number of cards displayed:

  • Small: 1 card
  • Medium: 3 cards
  • Large: 4 cards

Accessibility

  • No Auto-Play: The carousel does not move on its own. This is a big help for accessibility because sliding content can be really distracting for people with cognitive disabilities, low vision, or those who use screen readers.
  • Semantic Structure and Clear Labels for Screen Readers: The code uses special labels to tell assistive tools exactly what this part of the page is. By labeling each slide as a "group," it helps screen reader users stay oriented while they move through the list. A role="region" with an aria-roledescription="carousel" and an aria-label is used to identify the component clearly. Each slide is wrapped in a role="group" with an aria-roledescription="slide", providing a clear map for assistive technologies.
  • The Peek Effect: You can see the edges of the next and previous cards. This "peek" is a great visual hint that there is more to see, which makes it much easier for everyone to find more content.
  • Easy to Click Buttons: This design uses large navigation arrows instead of tiny dots. These are much easier to click for people who have trouble with fine motor skills or anyone using a phone.
  • Logical Headings: To keep things organized, the headings inside the cards should follow a logical order. For example, if the section title is a level two heading, the card titles should be level three so the page structure makes sense.

References

Back to top