Card

Cards are a self-contained unit of information, usually as part of a feed or series of similar content. Cards have a dynamic range of modifiers that allow text-only, text and illustration, and photography. All cards have an option to include text links or buttons as a primary action. The entire card can become an active click-target.

Card basic usage

Proin ut dui sed metus pharetra hend rerit vel non mi. Nulla ornare faucibus ex, non facilisis nisl.

Card with image and call to action

Example card

Proin ut dui sed metus pharetra hend rerit vel non mi. Nulla ornare faucibus ex, non facilisis nisl.

Card with thumbnail and call to action

Example card

Proin ut dui sed metus pharetra hend rerit vel non mi. Nulla ornare faucibus ex, non facilisis nisl.

Overrides

Additionally, you can fully customize any part of the Card through the overrides prop. The Card consists of multiple subcomponents that are listed bellow and you can override each one of them. To help you identify the names of these subcomponents, you can highlight them through this selector:

Example card

Proin ut dui sed metus pharetra hend rerit vel non mi. Nulla ornare faucibus ex, non facilisis nisl.

Note: You should always use longhand CSS properties. Mixing shorthands and longhands will lead into strange behaviors!

Card API

action import = null

Contents to be rendered at the bottom of the Card. Used to organize UI which enables user action.

react.Node

children import = null

Content to be rendered within the Card body.

react.Node

hasThumbnail function = hasThumbnail

Function that takes Card props and returns a boolean that represents if a thumbnail will be rendered.

thumbnail string
=> boolean

headerImage string

Image src to be positioned at the top of the Card.

overrides object = {}

Action { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>Object
Body { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>Object
Contents { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>Object
HeaderImage { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>Object
Root { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>Object
Thumbnail { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>Object
Title { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>Object

thumbnail string

Image src that by default is rendered to the side of children content.

title import

Content to render above the body content.

react.Node