Cards

Overview of Component Group

Cards are a major component type across the whole site. Cards may be displayed as an individual object or as part of a group. Cards are a responsive element and are meant to fit to 100% of their container.

Cards are made up of primary pieces which may be omitted depending on the context of use. But at a minimum each card is required to have a title and a url target.

Cards are meant to be actionable, not just decorative.

Design

There are eight different card designs available for use

Card

Fields in use:

Design Example

card mockup

Code

HTML

  

SCSS

  

Card with Button

Fields in use:

Design Example

card with button

Code

HTML

  

SCSS

  

Card with Media

Fields in use:

Design Example

card with media mockup

Code

HTML

  

SCSS

  

Card with Media and Button

Fields in use:

Design Example

card with media and button mockup

Code

HTML

  

SCSS

  

Left Flag

Fields in use:

Design Example

left flag

Code

HTML

  

SCSS

  

Right Flag

Fields in use:

Design Example

right flag

Code

HTML

  

SCSS

  

Left Flag with Button

Fields in use:

Design Example

left flag button

Code

HTML

  

SCSS

  

Right Flag with Button

Fields in use:

Design Example

right flag button

Code

HTML

  

SCSS

  

Get Help

Fields in use:

Functionality The Get Help cards are seen on the homepage, and may be used in other sections to draw attention to Find Treatment page, locators or helplines. The entire card may be clicked/tapped - the biggest difference is, the card would either bring a user to webpage or have the users browser prompt to call the number associated with the card. So the code needs to reflect the ability to dial the phone number displayed.

Design Example

get help card

Code

HTML

  

SCSS

  

Hover States

Design Example

card hover flag hover public messages hover cards get help hover

Functionality

Accessbility

The USWDS recommends using list Functionality for coding cards so that they are accessible.

- footer here -