Skip to main contentGatsby theme Carbon

ImageCard

The

<ImageCard>
component should generally be used inside of a
<Row className="image-card-group">
and
<Column>
component. This allows us to properly space the
<Column>
components when they wrap on mobile.

Example

Code

<Row className="image-card-group">
<Column colMd={4} colLg={4} noGutterSm>
<ImageCard title="Title" subTitle="Subtitle" href="/">
![Square](/images/square.jpg)
</ImageCard>
<ImageCard
title="Dark title"

Props

propertypropTyperequireddefaultdescription
childrennodeBackground image for the card, make sure it is saved out at the correct aspect ratio or it will appear distorted
hrefstringSet url for card
aspectRatiostring
1:1
Set card aspect ratio, default is
1:1
, options are
1:1
,
16:9
,
4:3
,
2:1
,
1:2
subTitlestringSmaller title on top left of card
titlestringLarge title
actionIconstringAction icon, default is no icon, options are
Launch
,
ArrowRight
,
Download
,
Disabled
,
Email
titleColorstring
light
Set title text color, default is
light
, options are
light
or
dark
subTitleColorstring
light
Set sub title text color, default is
light
, options are
light
or
dark
iconColorstring
light
Set icon color, default is
light
, options are
light
or
dark
hoverColorstring
light
Set hover to lighten or darken the image, default is
light
, options are
light
or
dark
disabledbool
false
Set for disabled card
classNamestringAdd custom class name