Skip to content

Card

Card

Card component is used to group information content, providing unified appearance and interaction behavior, commonly used in admin systems, information display and other scenarios.

Basic Usage

The most basic card usage, containing content area that can include any content.

Show CodeArrow
CopyGitHub

Card Title

You can set the card title through the title attribute, or use the titleIcon attribute to add a title icon.

Show CodeArrow
CopyGitHub

Shadow Effect

Through the shadow attribute, you can set when the card shadow is displayed. There are three optional values: always (always show), hover (show on hover), and never (never show).

Show CodeArrow
CopyGitHub

Slot Usage

Card component provides multiple slots, including default slot, header left slot, header right slot, and footer slot, which can achieve various custom layouts.

Show CodeArrow
CopyGitHub

Card API

Attributes

AttributeDescriptionTypeAccepted ValuesDefault
titleCard titlestring
titleIconTitle iconIconTypes
shadowWhen to show shadowstringalways / hover / neveralways

Slots

Slot NameDescription
defaultCard main content
headLeftCard header left content
headRightCard header right content
footerCard footer content

Style Variables

The card component uses the following style variables, which can be customized through SCSS variables:

Variable NameDescription
$shadow-colorCard shadow color
border-color()Card border color function
</rewritten_file>

Released under the MIT License