Skip to content

Card

Content card with optional accent bar, header/footer slots, and interactive hover state.

Usage

html
<tx-card>
  <h3 slot="header">Title</h3>
  <p>Card body content.</p>
  <div slot="footer">
    <tx-button size="sm" variant="primary">Action</tx-button>
  </div>
</tx-card>

<tx-card accent="primary" interactive>
  <h3 slot="header">Interactive Card</h3>
  <p>Lifts on hover, presses on click.</p>
</tx-card>

Properties

PropertyTypeDefaultDescription
interactivebooleanfalseHover lift and active press effects
flatbooleanfalseRemoves shadow, keeps border
compactbooleanfalseReduced padding
accentstring''Top accent bar color (primary, accent, success, danger)

Slots

SlotDescription
(default)Card body content
headerCard header section
footerCard footer section

CSS Parts

PartDescription
cardThe card container

Live Demo

Variants

Project Alpha

Card with primary accent bar and subtle shadow.

View

Design Review

Accent bar for categories or status indicators.

In Progress

Task Complete

Interactive — hover to lift, click to press.

Urgent Fix

Compact padding for dense layouts.

Nested Controls

Settings

Quick Form

Create