Card

Examples

card

Top image

Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente.

Image bottom

Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente.

Small image file

Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente.

Article
Photography
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
  <dv-card
    class="dv-bgbase100"
    bordered
    image="https://placeimg.com/400/225/arch"
    title="Top image"
    description="Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente."
  >
    <template v-slot:actions>
      <dv-button type="secondary">More info</dv-button>
    </template>
  </dv-card>

  <dv-card bordered class="dv-bgbase100">
    <dv-card-body>
      <dv-card-title> Image bottom </dv-card-title>
      <p>
        Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit
        necessitatibus veritatis sed molestiae voluptates incidunt iure
        sapiente.
      </p>
      <dv-card-actions>
        <dv-button type="primary">Login</dv-button>
        <dv-button type="ghost">Register</dv-button>
      </dv-card-actions>
    </dv-card-body>
    <dv-card-image src="https://placeimg.com/400/225/arch" />
  </dv-card>

  <dv-card bordered class="dv-bgbase100">
    <dv-card-image src="https://placeimg.com/400/225/arch" />
    <dv-card-body>
      <dv-card-title> Small image file </dv-card-title>
      <p>
        Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit
        necessitatibus veritatis sed molestiae voluptates incidunt iure
        sapiente.
      </p>
      <dv-card-actions>
        <dv-badge type="ghost">Article</dv-badge>
        <dv-badge type="ghost">Photography</dv-badge>
      </dv-card-actions>
    </dv-card-body>
  </dv-card>
</div>
vue

image-full

Image overlay

Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente.

<dv-card
  class="w-64 max-w-full"
  bordered
  image="https://placeimg.com/400/225/arch"
  title="Image overlay"
  description="Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente."
  image-full
>
  <template v-slot:actions>
    <dv-button type="secondary">More info</dv-button>
  </template>
</dv-card>
vue

card-compact

This card is compact

Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente.

<dv-card
  class="w-64 max-w-full dv-bgbase100"
  bordered
  image="https://placeimg.com/400/225/arch"
  title="This card is compact"
  description="Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente."
  compact
>
  <template v-slot:actions>
    <dv-button type="secondary">More info</dv-button>
  </template>
</dv-card>
vue

card with side image

Horizontal

Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente.

<dv-card
  class="dv-bgbase100"
  bordered
  image="https://placeimg.com/400/225/arch"
  title="Horizontal"
  description="Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente."
  side
>
  <template v-slot:actions>
    <dv-button type="secondary">More info</dv-button>
  </template>
</dv-card>
vue

card without image

No Images

Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente.

<dv-card
  class="dv-bgbase100"
  bordered
  title="No Images"
  description="Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente."
>
  <template v-slot:actions>
    <dv-button type="secondary">More info</dv-button>
  </template>
</dv-card>
vue

glass card

Glass

Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente.

<div
  class="flex items-center w-full px-4 py-10 bg-cover text-white rounded-lg"
  style="background-image:url(https://placeimg.com/400/225/arch)"
>
  <dv-card
    bordered
    glass
    side
    image="https://placeimg.com/400/225/arch"
    title="Glass"
    description="Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus veritatis sed molestiae voluptates incidunt iure sapiente."
  >
    <dv-card-image class="p-6">
      <img class="rounded-2xl" src="https://placeimg.com/400/225/arch" />
    </dv-card-image>
    <dv-card-body>
      <dv-card-title> Glass </dv-card-title>
      <p>
        Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit
        necessitatibus veritatis sed molestiae voluptates incidunt iure
        sapiente.
      </p>
      <dv-card-actions>
        <dv-button type="glass">More info</dv-button>
      </dv-card-actions>
    </dv-card-body>
  </dv-card>
</div>
vue

Card

Attributes

namedescriptiontypedefault
borderedadds border to cardbooleantrue
sidethe image in figure will be on to the sidebooleanfalse
imageFullthe image in figure element will be the backgroundbooleanfalse
compactapplies smaller paddingbooleanfalse
glassapplies glass stylebooleanfalse
imageimage url of card (works when no default solt)string-
titletitle of card (works when no default solt)string-
descriptiondescription of card (works when no default solt)string-

Slots

namedescription
defaultcard content
actionscard actions(this works only when slots.default is undefined)

CardImage

Attributes

namedescriptiontypedefault
srcimage url of cardstring-

CardBody

Attributes

-

CardTitle

Attributes

namedescriptiontypedefault
componentthe rendered element of titlestringh2

CardActions

Attributes

-