Skip to main content

Media Card

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

Example

Mock Media Card

Elite

Fit to Fly

pro

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
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

Customization

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 of 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>