Card containers can be clickable or non-clickable (see Types). The sizing of cards is controlled by the CardDeck
and both height and width can be customized. All cards within a CardDeck
must have the same dimensions. The default size of a card is 268px wide by 214px high with an internal padding of 16px.
Headers are optional elements spanning the top of the card. They can denote status (see Types) or provide other high-level information such as dates or titles. Headers should not contain more than one line even when localized.
Footers are optional elements spanning the bottom of the card.
Card messages should be concise and pertain to a single subject. Test text to make sure that it fits the dimensions of the card; overflow text should be truncated. Left alignment is preferred.
Buttons can be added to non-clickable cards (see Types).
Cards may contain media such as images and charts
.
Cards in a CardDeck
are responsive to browser width and will wrap.
They should not display additional information on hover. They are not scrollable nor closable.
Interaction Cards can be clickable or non-clickable (see Types).
Position The alignment and positioning of cards are determined by CardDeck
. They can be left aligned, centered, or justified.
Clickable cards allow users to click anywhere on the card to view additional details. Because of this, the card itself will receive focus, so they cannot contain additional interactive elements (e.g. fields, buttons, links). They will display a drop shadow and hover state by default. Non-clickable cards should contain interactive elements that will each receive focus. Use the onClick
property to define a callback function and to make a card clickable.
The status types of cards refer to the styling on the header
for each card. Use the type
property to define the desired status.