Skip to main contentGatsby theme Carbon

SquareCard

The <SquareCard> component should generally be used inside of a <Row className="square-card-group"> component. This allows us to properly space the columns components when they wrap on mobile.

Example

Small title here

A short body paragraph describing the card could go here.

Small title here

A short body paragraph describing the card could go here.

(Optional text)

Code

components/SquareCard/SquareCard.js
import { Tools } from '@carbon/pictograms-react';
<Row className="square-card-group">
<SquareCard
title="A small sentence can go here in conjunction with a pictogram"
href="/"
>
<Tools aria-label="Tools" className="my-custom-class" />
</SquareCard>

Props

propertypropTyperequireddefaultdescription
childrennodeOptional pictogram icon to add to bottom left corner cannot be combined with ‘helperText’
hrefstringSet url for card
smallTitleboolfalseSet to true to display smaller title
titlestringCard title - default is large
actionIconstringArrowRightAction icon, default is no ‘ArrowRight’, options are Launch, ArrowRight, Download, Disabled, Email
disabledboolfalseSet for disabled card
classNamestringAdd custom class name
helperTextstringOptional helper text that appears at the bottom left corner cannot be combined with ‘children’ text. This is only meant for a date or a category name
bodyTextstringOptional body text for card description
colorstringlightSet to dark for dark background