Skip to main content

Media Card

A MediaCard displays an image or video with optional text, buttons and links positioned on top.

Example

Variants

Use theicon above to preview
VariantDescriptionValues
MediaCard.desktopOrientationOrientation of media card content on desktop viewports
  • top
  • bottom
  • left
  • right
  • center
  • topLeft
  • topRight
  • bottomLeft
  • bottomRight
MediaCard.mobileOrientationOrientation of media card content on mobile viewports
  • top
  • bottom
  • left
  • right
  • center
  • topLeft
  • topRight
  • bottomLeft
  • bottomRight
MediaCard.paddingTopOption to control spacing above the media card
  • regular
  • extra
MediaCard.paddingBottomOption to control spacing below the media card
  • regular
  • extra
MediaCard.heightHeight control useful for using media card in various contexts
  • default
  • hero
  • banner
  • icon
MediaCard.layoutLayout options
  • default
  • stacked
MediaCardTextBlock.positionText alignment of rich text block
  • left
  • right
  • center
MediaCardCTAs.directionPresentation direction of CTAs
  • rowStart
  • rowEnd
  • rowCenter
  • columnStart
  • columnEnd
  • columnCenter
MediaCardLinks.directionPresentation direction of Links
  • rowStart
  • rowEnd
  • rowCenter
  • columnStart
  • columnEnd
  • columnCenter
MediaCardLinks.imageLinkDirectionPresentation direction of Image Links
  • rowStart
  • rowEnd
  • rowCenter
  • columnStart
  • columnEnd
  • columnCenter

Customization

The approach for customization will vary depending on if the customization is intended to be global for all consumers of the UI component or if it is only an override for a particular instance.

  • If the customization is necessary for all users, update the component source code in the UI library package directly.
  • Otherwise, you can pass className overrides.

Say you wanted to make the header text larger in one particular instance:

<MediaCard>
...
<MediaCardContent>
<MediaCardTextBlock position={textBlockPosition}>
<MediaCardEyebrowText>{item?.eyebrowText}</MediaCardEyebrowText>
<MediaCardHeader className='text-6xl'>{item?.header}</MediaCardHeader>
<MediaCardSubcopy>{item?.subcopy}</MediaCardSubcopy>
</MediaCardTextBlock>
</MediaCardContent>
</MediaCard>