Cards are customizable content containers that group related information (e.g. expense reports, invoices, apps, etc.) in a flexible-sized container visually resembling a playing card. Cards are best suited for cases when users browse for information, rather than search. Cards must be contained within a CardDeck
. Sizing of cards is controlled by the CardDeck
.
The different types of cards refer to the styling on the header
for each card. Use the type
property to define the desired type.
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.
Property | Type | Default | Description |
---|---|---|---|
children | Node | Renderable content for the body of the card. | |
className | String | Custom classes to add to the card’s <li> tag. | |
footer | Node | Renderable content for the footer of the card. If not provided, no footer will appear. | |
header | Node | Renderable content for the header of the card. If not provided, no header will appear. | |
tabIndex | String | Set the tab index of the <a> tag. | |
type | String | Type/style of card header (if provided). Options are 'success' , 'danger' , 'info' . |
Property | Parameters | Description |
---|---|---|
onClick | event | Callback function when the card is clicked. If not provided, the card will not appear or be clickable. |