title: Cards

Cards

Flexible card components for displaying content in a contained format.

Basic Card

This is a basic card with just a body section.

Card Title

Card with header and body.

<div class="card">
  <div class="card-header">
    <h3 class="card-title">Card Title</h3>
  </div>
  <div class="card-body">Content here</div>
</div>

Full Card Structure

Card Title

With a subtitle

This card has a header with title and subtitle, a body section, and a footer with actions.

Using <w-card> Component

Using the w-card component with just a title.

Using the w-card component with title and footer props.

<w-card title="Simple Card">
  <p>Card content here</p>
</w-card>

<w-card title="With Footer" footer="Footer text">
  <p>Card content here</p>
</w-card>

Size Variants

Small Card

Compact padding for smaller content.

Default Card

Standard padding for regular content.

Large Card

More padding for spacious layouts.

<div class="card card-sm">...</div>
<div class="card">...</div>
<div class="card card-lg">...</div>

Style Variants

Elevated

No border, shadow instead.

Flat

No border, subtle background.

Bordered

Thicker border for emphasis.

<div class="card card-elevated">...</div>
<div class="card card-flat">...</div>
<div class="card card-bordered">...</div>

Interactive Card

Hover Me

This card lifts on hover.

Click Me

Perfect for clickable items.

Select Me

Great for selection UIs.

<div class="card card-interactive">...</div>

Color Variants

Primary Card

A card with primary color accent.

Success Card

A card with success color accent.

Warning Card

A card with warning color accent.

Danger Card

A card with danger color accent.

<div class="card card-primary">...</div>
<div class="card card-success">...</div>
<div class="card card-warning">...</div>
<div class="card card-danger">...</div>

CSS Classes Reference

Class Description
cardBase card container
card-headerCard header section
card-titleCard title styling
card-subtitleCard subtitle styling
card-bodyCard body/content section
card-footerCard footer section
card-imageImage inside card
card-smSmall card (less padding)
card-lgLarge card (more padding)
card-elevatedShadow instead of border
card-flatNo border, subtle background
card-borderedThicker border
card-interactiveHover lift effect
card-horizontalHorizontal layout
card-primaryPrimary color accent
card-successSuccess color accent
card-warningWarning color accent
card-dangerDanger color accent

<w-card> Component

Prop Description
titleCard header title (optional)
footerCard footer content (optional)
sizeSize class: card-sm, card-lg
variantStyle class: card-elevated, card-primary, etc.