Cards

A cn-card is a fixed container for a piece of content. It can be used to display a small amount of information, or to highlight a piece of content.

With some text

Elevation

The cards support 5 levels of elevation (starting from 0). The default elevation of a card is 1.

Legend

UI states

The card supports 3 UI states: default, notify, and alert.

Legend

Full example

This is a card. It can be used to display a small amount of information, or to highlight a piece of content.

Using more than 1-3 short paragraphs of text is not recommended. The text in these paragraphs is .small.

Parameters

ParameterTypeDefaultDescription
elevationNumber1The elevation of the card.
coverStringundefinedThe URL of the cover image.
nounStringundefinedThe noun of the card.
titleStringThe title of the card.
hrefURLThe URL to link to when the card title or cover is clicked.

Slots

SlotDescription
defaultAny content in the default slot will be rendered in the card body. The card body should be used sparingly for extract and synopsis purposes - and should consists one or more of paragraphs of text
actionsThe actions to display at the bottom of the card.