U.S. flagA digital services project by Flexion

Card

layoutUSWDS-derived

A card groups related content in a container with header, body, media, and footer sections.

Reference: USWDS documentation ↗

Variants

Default

Card Title

Placeholder

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore.

Flag

Flag Layout

Placeholder

Horizontal layout with image on the left.

Flag Media Right

Flag Media Right

Placeholder

Horizontal layout with image on the right.

Header First

Header First

Placeholder

The header appears above the media in this variant.

Contract

Class mapping

USWDSFlexNotes
usa-card.flex-cardOuter card wrapper
usa-card__container.flex-card__containerInner card container with border and background
usa-card__header.flex-card__headerCard header section
usa-card__heading.flex-card__headingCard heading text
usa-card__media.flex-card__mediaCard media wrapper
usa-card__img.flex-card__imgCard image container
usa-card__body.flex-card__bodyCard body content
usa-card__footer.flex-card__footerCard footer section
usa-card--flagdata-variant="flag"Horizontal flag layout variant
usa-card--header-firstdata-variant="header-first"Header above media variant
usa-card--media-rightdata-media-rightMedia on right side (flag variant)
usa-card__media--insetdata-inset-mediaMedia with padding inset

Verified properties

border-widthborder-styleborder-colorborder-radiusbackground-colorcolorfont-familydisplayflex-directionpadding-toppadding-rightpadding-bottompadding-left

Intentional differences

border-color: ours = var(--flex-gray-cool-10), USWDS = #dfe1e2

We use semantic token that resolves to the same value in light mode

Source CSS