Flutter docs
Default skin

Card

A container for displaying information.

When to use

A card can be used to display content related to a single subject. The content can consist of multiple elements of varying types and sizes.

Examples

Basic card

A basic card containing a title, content and an extra corner content. Supports two sizes: medium and small.

No border

A borderless card on a gray background.

Simple card

A simple card only containing a content area.

Customized content

You can use Card.Meta to support more flexible content.

Card in column

Cards usually cooperate with grid column layout in overview page.

Loading card

Shows a loading indicator while the contents of the card is being fetched.

Grid card

Grid style card content.

Inner card

It can be placed inside the ordinary card to display the information of the multilevel structure.

With tabs

More content can be hosted.

Support more content configuration

A Card that supports cover, avatar, title and description.

Custom semantic dom styling

You can customize the semantic dom style of Card by passing objects/functions through classNames and styles.

API

Card, Card.Grid, and Card.Meta are exported from @ceebee/ui/client.

Card

PropertyDescriptionTypeDefaultVersion
actionsThe action list, shows at the bottom of the CardArray<ReactNode>-—
activeTabKeyCurrent TabPane's keystring-—
borderedToggles rendering of the border around the card, please use variant insteadbooleantrue—
bodyStyleStyle of card body, please use styles.body insteadCSSProperties--
variantVariants of Cardoutlined | borderlessoutlined5.24.0
classNamesCustomize class for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, string> | (info: { props })=> Record<SemanticDOM, string>-—
coverCard coverReactNode-—
defaultActiveTabKeyInitial active TabPane's key, if activeTabKey is not setstringThe key of first tab—
extraContent to render in the top-right corner of the cardReactNode-—
hoverableLift up when hovering cardbooleanfalse—
headStyleStyle of card head, please use styles.header insteadCSSProperties--
loadingShows a loading indicator while the contents of the card are being fetchedbooleanfalse—
sizeSize of cardmedium | smallmedium—
tabBarExtraContentExtra content in tab barReactNode-—
tabListList of TabPane's headTabItemType[]-—
tabPropsTabs--—
titleCard titleReactNode-—
typeCard style type, can be set to inner or not setstring-—
stylesCustomize inline style for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, CSSProperties> | (info: { props })=> Record<SemanticDOM, CSSProperties>-—
onTabChangeCallback when tab is switched(key) => void-—

Card.Grid

PropertyDescriptionTypeDefaultVersion
hoverableLift up when hovering card gridbooleantrue—

Card.Meta

PropertyDescriptionTypeDefaultVersion
avatarAvatar or iconReactNode-—
descriptionDescription contentReactNode-—
titleTitle contentReactNode-—