Card

Flexible content containers. Use <article> as the semantic element with class card. The framework styles header, footer, and child elements automatically — no sub-classes needed.

Basic Card

Card Title

This is the card body content. It describes the purpose or details of the card item clearly and concisely.

<article class="card">
  <header>
    <h3>Card Title</h3>
  </header>
  <p>Card content goes here.</p>
  <footer>
    <button class="primary">Action</button>
    <button class="secondary">Cancel</button>
  </footer>
</article>

Card with Icon

Place an axicon as the first child — the framework sizes and colors it automatically:

Developer API

Integrate seamlessly with our REST API and webhooks.

Verified

Your account identity has been confirmed.

<article class="card">
  <span class="axicon render" data-name="Code"></span>
  <h3>Developer API</h3>
  <p>Integrate seamlessly with our REST API.</p>
</article>

Card with Media

Use <figure> as the first child for media previews — the framework handles the negative margin and rounding automatically:

Media Card

The figure element at the top bleeds edge-to-edge automatically.

<article class="card">
  <figure>
    <img src="cover.jpg" alt="Cover">
  </figure>
  <header>
    <h3>Media Card</h3>
  </header>
  <p>The figure element bleeds edge-to-edge automatically.</p>
</article>

Ghost Card

The ghost modifier creates a transparent, borderless card — useful for icon-centered feature lists:

Fast

15.3 KB gzipped.

Accessible

WCAG 2.1 AA by default.

Semantic

One class per component.

<div class="card ghost">
  <span class="axicon render primary" data-name="Zap"></span>
  <h4>Fast</h4>
  <p>15.3 KB gzipped.</p>
</div>

Filled Card

The filled modifier applies the primary container background — ideal for highlighted or featured content:

Featured Content

This card uses the primary container color, automatically adapting to light and dark themes.

<article class="card filled">
  <header>
    <h3>Featured Content</h3>
  </header>
  <p>Highlighted content that adapts to the theme.</p>
  <footer>
    <button class="primary">Learn More</button>
  </footer>
</article>

Clickable Card

Use <a> with class card for fully-linked cards:

Card Grid

Wrap cards in a .grid container for responsive auto-layout:

<div class="grid">
  <article class="card">...</article>
  <article class="card">...</article>
  <article class="card">...</article>
</div>

Semantic Structure

The card follows natural document order. The framework automatically styles each child element based on its semantic role — no sub-classes ever needed:

ElementRoleAutomatic Styling
article.cardContainerSurface, border, radius, shadow, flex column
headerTitle areaMargin bottom
h3, h4TitleSize, weight, color, spacing
pBody textColor, line height, reading width
figureMediaNegative bleed margin, overflow hidden
footerActionsPushed to bottom via margin-top: auto
.axicon (first child)IconSize 2.5rem, primary color, margin bottom

Accessibility

  • Use <article> for self-contained content — it has implicit landmark meaning
  • Use <a class="card"> for clickable cards — never onclick on a div
  • All cards receive focus styles via :focus-visible
  • Maintain heading hierarchy — h3 inside cards, not h1 or h2
  • Images inside figure must have meaningful alt text

Glassmorphic Card

Use the glass modifier to create beautiful, frosted-glass depth effects, perfect for overlays or vibrant backgrounds:

Glassmorphic Design

This card blends into the vibrant background using CSS backdrop-filter.

<article class="card glass">
  <header><h3>Glassmorphic Design</h3></header>
  <p>Frosted glass effect applied.</p>
</article>

Features

  • Semantic Structure - Built with native HTML5 elements for maximum reliability.
  • Theme Aware - Automatically adapts to all 22 Axiom01 themes via OKLCH tokens.
  • Fully Responsive - Scales perfectly from mobile to desktop screens.
  • No JS Dependency - Core functionality relies on pure CSS for maximum performance.
  • Customizable - Easily extendable via Axiom01's design tokens and modifiers.

Use Cases

The Card component is designed for versatile implementation across modern web applications. Ideal scenarios include:

  • Dashboards & Admin Panels - Structured data presentation and interface control.
  • Content Management Systems - Organizing complex information hierarchies and media.
  • E-Commerce Platforms - Enhancing product discovery and user workflows.
  • Marketing Sites - Highlighting key product offerings cleanly and effectively.
  • SaaS Applications - Delivering native-feeling, responsive app experiences.