Cards

Cards group content with consistent padding, borders, and elevation. Combine variants with .vd-card-glow, .vd-card-glass, or the Water Morph effect for richer demos.

Variants

Elevated is the default: medium shadow (stronger in dark mode). Outlined drops the shadow for a crisp border. Filled uses a subtle surface tint and no border.

Elevated Card

Default elevated surface — compare the shadow to outlined and filled.

Outlined Card

Border only, no drop shadow — ideal on busy backgrounds.

Filled Card

Secondary background fill, no border — reads as a soft panel.

Glow on hover

Add .vd-card-glow for a soft primary-tinted halo and border shift on hover (in addition to the elevated hover lift when applicable).

Hover this card

Glow uses --vd-card-glow-color / --vd-card-glow-border-color.

Glass (frosted)

.vd-card-glass applies the glass token stack from the Glass Effects system — best seen over imagery or gradients. Respects prefers-reduced-transparency via the glass utilities.

Glass Card

Backdrop blur and translucent fill let the stage show through.

Morph inside a card

Pair a card shell with the Water Morph effect to swap summary ↔ detail. Uses .vd-morph-lg for a slower wave.

Interactive surface
Fibonacci spacingClick to read moreFibonacci spacingMargins and padding use the golden-ratio scale for harmonious rhythm across components.
Compact & spacious
Compact

.vd-card-compact tightens header, body, and footer padding.

Spacious

.vd-card-spacious uses larger Fibonacci padding for airy layouts.

<div class="vd-card">
  <div class="vd-card-header">
    <h3>Card Title</h3>
  </div>
  <div class="vd-card-body">
    <p>Card content goes here.</p>
  </div>
  <div class="vd-card-footer">
    <button class="vd-btn vd-btn-primary vd-btn-sm">Action</button>
  </div>
</div>

<!-- Outlined variant -->
<div class="vd-card vd-card-outlined">...</div>

<!-- Filled variant -->
<div class="vd-card vd-card-filled">...</div>
.vd-card {
  background-color: var(--vd-card-bg);
  border-radius: var(--vd-card-border-radius);
  box-shadow: var(--vd-card-shadow-elevated);
}

.vd-card-outlined {
  box-shadow: none;
  border: 1px solid var(--vd-border-color);
}

.vd-card-filled {
  box-shadow: none;
  background-color: var(--vd-card-bg-filled);
  border: none;
}
Card Groups

Use .vd-card-group to connect cards with shared borders and no gaps — great for pricing tiers or feature lists.

Free

$0

Basic features

Pro

$12

Everything in Free

Enterprise

Custom

Dedicated support

<div class="vd-card-group">
  <div class="vd-card">
    <div class="vd-card-header"><h6>Free</h6></div>
    <div class="vd-card-body">
      <p class="vd-text-2xl vd-font-bold vd-mb-3">$0</p>
      <p class="vd-text-sm vd-text-muted">Basic features</p>
    </div>
  </div>
  <div class="vd-card">
    <div class="vd-card-header"><h6>Pro</h6></div>
    <div class="vd-card-body">
      <p class="vd-text-2xl vd-font-bold vd-mb-3">$12</p>
      <p class="vd-text-sm vd-text-muted">Everything in Free</p>
    </div>
  </div>
  <div class="vd-card">
    <div class="vd-card-header"><h6>Enterprise</h6></div>
    <div class="vd-card-body">
      <p class="vd-text-2xl vd-font-bold vd-mb-3">Custom</p>
      <p class="vd-text-sm vd-text-muted">Dedicated support</p>
    </div>
  </div>
</div>
Image Cards

Cards with top images using .vd-card-image or .vd-card-image-container for overlay text.

Landscape
Landscape

Cards can hold images, charts, maps, or any media at the top.

<div class="vd-card">
  <div class="vd-card-image-container" style="position: relative;">
    <img src="landscape.jpg" alt="Landscape" class="vd-card-image"
         style="width: 100%; height: 160px; object-fit: cover;">
    <div style="position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem;
                background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: white;">
      <h5 class="vd-mb-0">Landscape</h5>
    </div>
  </div>
  <div class="vd-card-body">
    <p class="vd-text-sm vd-text-muted vd-mb-0">Cards can hold images, charts, maps, or any media at the top.</p>
  </div>
</div>
Actionable Cards

Add .vd-card-interactive for hover lift, cursor pointer, and focus ring — perfect for clickable cards that navigate or trigger modals.

Get Started

Click this card to navigate — the whole surface is interactive.

<div class="vd-card vd-card-interactive vd-card-glow" role="button" tabindex="0">
  <div class="vd-card-body">
    <i class="ph ph-rocket-launch" style="font-size: 2rem; color: var(--vd-color-primary);
       margin-bottom: 0.75rem; display: block;"></i>
    <h5>Get Started</h5>
    <p class="vd-text-sm vd-text-muted vd-mb-0">Click this card to navigate — the whole surface is interactive.</p>
  </div>
</div>
Class Reference

Usage

<script setup lang="ts">
import { VdCard } from "@vanduo-oss/vd3";
</script>

<template>
  <VdCard interactive>
    <template #header><h6>Project</h6></template>
    Body content goes in the default slot.
    <template #footer>
      <button class="vd-btn vd-btn-primary">Open</button>
    </template>
  </VdCard>
</template>

CSS Classes

ClassDescriptionType
.vd-cardBase card container — required on all cardsBase
.vd-card-elevatedExplicit elevated shadow (same as default .vd-card)Variant
.vd-card-outlinedOutlined card with border, no shadowVariant
.vd-card-filledFilled card with secondary background, no borderVariant
.vd-card-glassFrosted glass surface (see Glass Effects tokens)Variant
.vd-card-glowAdds soft primary-colored glow on hoverModifier
.vd-card-compactReduces padding on header, body, footerModifier
.vd-card-spaciousIncreases padding on header, body, footerModifier
.vd-card-groupConnects adjacent cards with shared borders, no gapsLayout
.vd-card-imageImage inside a card (typically at top)Media
.vd-card-image-containerWrapper for image with overlay text supportMedia
.vd-card-interactiveHover lift + cursor pointer + focus ring for clickable cards (renamed from .vd-card-actionable in framework 1.7.0)Modifier
.vd-card-headerCard header section with bottom borderStructure
.vd-card-bodyCard body section with paddingStructure
.vd-card-footerCard footer section with top borderStructure

Component API (Vue 3)

Prop / slotDescription
:elevatedRaised shadow treatment (.vd-card-elevated).
:interactiveHover lift + cursor pointer + focus ring (.vd-card-interactive).
#header / default / #footerHeader, body, and footer slots (header/footer render only when provided).