ResourceCard

The <ResourceCard> component should generally be used inside of a <Row> and test <Column> with a className="resource-card-group" placed on the container row. This allows the correct border placement between a group of cards.

Example

Code

With title

<Column colMd={4} colLg={4} noGutterSm> <ResourceCard subTitle="With subtitle" title="Title" aspectRatio="2:1" actionIcon="arrowRight" href="https://github.com/IBM/carbon-elements/blob/master/.github/CONTRIBUTING.md" > ![Github icon](/images/github-icon.png) </ResourceCard> </Column>

Only subtitle

<Column colMd={4} colLg={4} noGutterSm> <ResourceCard subTitle="Only subtitle" actionIcon="download" aspectRatio="2:1" href="https://github.com/IBM/carbon-elements/blob/master/.github/CONTRIBUTING.md" > ![Github icon](/images/github-icon.png) </ResourceCard> </Column>

Dark

<Column colMd={4} colLg={4} noGutterSm> <ResourceCard subTitle="Alternate color" title="Dark" aspectRatio="2:1" color="dark" actionIcon="email" href="https://github.com/IBM/carbon-elements/blob/master/.github/CONTRIBUTING.md" > ![Sketch icon](/images/sketch-icon.png) </ResourceCard> </Column>

Disabled

<Column colMd={4} colLg={4} noGutterSm> <ResourceCard title="Disabled card" aspectRatio="2:1" disabled href="https://github.com/IBM/carbon-elements/blob/master/.github/CONTRIBUTING.md" /> </Column>

Props

propertypropTyperequireddefaultdescription
childrennodeUse 32x32 image as child, will display in bottom left of card
hrefstringSet url for card
subTitlestringSmaller title
titlestringLarge title
actionIconstringlaunchAction icon, default is launch, options are Launch, ArrowRight, Download, Disabled, Email
aspectRatiostring2:1Set card aspect ratio, default is 2:1, options are 1:1, 16:9, 4:3
colorstringlightSet to dark for dark background
disabledboolfalseSet for disabled card
classNamestringAdd custom class name