Skip to content

Cards

Cards serve as containers for various web content. They offer a basic overview of the most relevant data for a subject or problem. It is important to arrange elements such as text and photos in a way that makes sense of hierarchy. Demo Here

Import

jsx
import ECard from "@components/Elements/ECard";
import ECardHeader from "@components/Elements/ECard/ECardHeader";
import ECardBody from "@components/Elements/ECard/ECardBody";
import ECardFooter from "@components/Elements/ECard/ECardFooter";

Usage

Card components can vary to accommodate the many sorts of material they carry. The following components are frequently seen in that variation.

  1. ECard
  2. ECardHeader
  3. ECardBody
  4. ECardFooter
jsx
<ECard>
  <ECardHeader>
    title
  </ECardHeader>
  <ECardBody>
    content
  </ECardBody>
  <ECardFooter>
    footer
  </ECardFooter>
</ECard>

Props

For ECard component, the following props are available:

PropTypeDefaultNote
shadowBooleanfalseAdds shadow to the card.
width[String, Number]-Sets the card element's width. Default unit is px.
height[String, Number]-Sets the card element's height. Default unit is px.
paperBooleanfalseIt creates a paper shaped card.
squareBooleanfalseSquares the corners of the card.
hrefString-This attribute creates a linked card.
toString-This attribute creates a linked card.
targetString"_self"It specifies where to open the linked document. _self opens the linked document in the same frame as it was clicked.
classNameString-Overrides or extends the component's styles.

For ECardHeader component, the following props are available:

PropTypeDefaultNote
squareBooleanfalseSquares the corners of the card.
classNameString-Overrides or extends the component's styles.

For ECardBody component, the following props are available:

PropTypeDefaultNote
classNameString-Overrides or extends the component's styles.

For ECardFooter component, the following props are available:

PropTypeDefaultNote
classNameString-Overrides or extends the component's styles.

Children

Each Card component provides a children props that enable you to customize the content.

ChildrenDescription
✔️Component's content.

COPYRIGHT