logo

Card

Simple rectangular container.

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

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

expand code expand code

A borderless card on a gray background.

expand code expand code

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

expand code expand code

Grid style card content.

expand code expand code

Cards usually cooperate with grid column layout in overview page.

expand code expand code

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

expand code expand code

Shows a loading indirector while the contents of the card is being featched.

expand code expand code

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

expand code expand code

A simple card only containing a content area.

expand code expand code

More content can be hosted.

expand code expand code

Card API#

Property Description Type Default Value
ChildContent ParameterContent for the card's body. Shown below AntDesign.Card.Body RenderFragment --
Body ParameterContent for the card's body. Shown above AntDesign.Card.ChildContentUse ChildContent instead

Obsolete Will be removed in a future version.
RenderFragment --
ActionTemplate ParameterContent to put in the actions section of the card. Takes priority over AntDesign.Card.Actions RenderFragment --
Bordered ParameterToggles rendering of the border around the card Boolean true
Hoverable ParameterMake card hoverable Boolean false
Loading ParameterShows a loading indicator while the contents of the card are being fetched Boolean false
BodyStyle ParameterStyle string for body section String --
Cover ParameterCover content for card. Displayed below header and above body RenderFragment --
Actions ParameterActions for the card IList<RenderFragment> --
Type ParameterCard style type, can be set to inner or not set String --
Size ParameterSize of the card String --
Title ParameterTitle string for header String --
TitleTemplate ParameterTitle content for header. Takes priority over AntDesign.Card.Title RenderFragment --
Extra ParameterContent to render in the top-right corner of the card RenderFragment --
Id ParameterID for the component's HTML String Uniquely Generated ID
Class ParameterSpecifies one or more class names for an DOM element. String --
Style ParameterSpecifies an inline style for a DOM element. String --
RefBack ParameterA ForwardRef instance. You can get a reference to the internal DOM by using AntDesign.ForwardRef.Current. ForwardRef --

CardGrid API#

Property Description Type Default Value
ChildContent ParameterContent for that section of the grid RenderFragment --
Hoverable ParameterIf the section should be hoverable. Adds dropshadow and lifts up when hovered if true. Boolean false
Id ParameterID for the component's HTML String Uniquely Generated ID
Class ParameterSpecifies one or more class names for an DOM element. String --
Style ParameterSpecifies an inline style for a DOM element. String --
RefBack ParameterA ForwardRef instance. You can get a reference to the internal DOM by using AntDesign.ForwardRef.Current. ForwardRef --

CardMeta API#

Property Description Type Default Value
Title ParameterTitle string String --
TitleTemplate ParameterTitle content. Takes priority over AntDesign.CardMeta.Title RenderFragment --
Description ParameterDescription string String --
DescriptionTemplate ParameterDescription content. Takes priority over AntDesign.CardMeta.Description RenderFragment --
Avatar ParameterAvatar string. Will be passed to Avatar component's AntDesign.Avatar.Src String --
AvatarTemplate ParameterAvatar content. Takes priority over AntDesign.CardMeta.Avatar RenderFragment --
Id ParameterID for the component's HTML String Uniquely Generated ID
Class ParameterSpecifies one or more class names for an DOM element. String --
Style ParameterSpecifies an inline style for a DOM element. String --
RefBack ParameterA ForwardRef instance. You can get a reference to the internal DOM by using AntDesign.ForwardRef.Current. ForwardRef --

CardAction API#

Property Description Type Default Value
ChildContent ParameterThe action of the card. RenderFragment --
Id ParameterID for the component's HTML String Uniquely Generated ID
Class ParameterSpecifies one or more class names for an DOM element. String --
Style ParameterSpecifies an inline style for a DOM element. String --
RefBack ParameterA ForwardRef instance. You can get a reference to the internal DOM by using AntDesign.ForwardRef.Current. ForwardRef --
Calendar Carousel
文档已更新,请点击 此处 更新。
A new version of this app is available. Click here to update.