Skip to content

Card

Integrate information in a card container.

Basic usage

Card includes title, content and operations. Card is made up of header and body. header is optional, and its content distribution depends on a named slot.

Card name
Card content 1
Card content 2
Card content 3
Card content 4

Simple card

The header part can be omitted.

Card content 1
Card content 2
Card content 3
Card content 4

Effects

Card provide five different themes: outset、inset、bordered、outlined and flat. Using effect to change, default is outset.

Card name
Card content 1
Card content 2
Card content 3
Card content 4
Card name
Card content 1
Card content 2
Card content 3
Card content 4
Card name
Card content 1
Card content 2
Card content 3
Card content 4
Card name
Card content 1
Card content 2
Card content 3
Card content 4

With images

Display richer content by adding some configs.The body-style attribute defines CSS style of custom body. This example also uses tu-col for layout.

European Style Street
European Style Street
European Style Street

Sizes

Besides default size, tu-card component provides three additional sizes for you to choose among different scenarios. Use attribute size to set additional sizes with mini, small, large.

Mini card
Card content 1
Card content 2
Card content 3
Card content 4
Small card
Card content 1
Card content 2
Card content 3
Card content 4
Medium Card
Card content 1
Card content 2
Card content 3
Card content 4
Large Card
Card content 1
Card content 2
Card content 3
Card content 4

Card API

Card Attributes

NameDescriptionTypeDefault
titleTitle of CardString-
extraContent to render in the top-right corner of the cardString-
body-styleThe style of the Card bodyObject-
effectEffect of CardStringoutset
sizeSize of CardStringmedium

Card Slots

NameDescription
titleTitle of Card
extraContent to render in the top-right corner of the card
defaultCustomize default content