CARD SYSTEM: Production card component with elevation hierarchy
FEATURES: 3 Elevation Levels | Semantic Variants | Interactive States | Selection Patterns | Media Support
Cards are flexible containers for grouping related content. The production system emphasizes elevation hierarchy (shadow depth) over colored backgrounds. Use elevation to express content priority, semantic colors for feedback, and interactive states for user engagement.
3-Tier System: Cards use shadow depth to express visual hierarchy. Base cards for inline content, elevated for featured content, prominent for primary actions.
Flat card with no shadow.
Default card with subtle shadow. Use for inline content, standard layouts, and default containers.
Medium shadow for featured content. Use to highlight important sections or secondary emphasis.
Strong shadow for primary actions. Use for wizard cards, critical decisions, and high-priority content.
<div class="tw-card">...</div><div class="tw-card tw-card-elevated">...</div><div class="tw-card tw-card-prominent">...</div>
Left Accent Border: 3px primary-colored accent for urgent or high-priority content. Combines with any elevation level.
No shadow with priority accent. Subtle emphasis for important items in dense layouts.
Standard elevation with priority accent for important notices.
Featured content with priority indicator. Common for actionable items.
Maximum emphasis for critical decisions requiring immediate attention.
<div class="tw-card tw-card-flat tw-card-high-priority">...</div><div class="tw-card tw-card-high-priority">...</div><div class="tw-card tw-card-elevated tw-card-high-priority">...</div>
Feedback Colors: Subtle tinted backgrounds for semantic meaning. Positive (success), Negative (error), Caution (warning). Combine with any elevation level. Box-shadow borders automatically match the semantic color.
Success feedback with no shadow. Use in dense layouts or nested cards where elevation would be excessive.
Error feedback with no shadow. Subtle error indication for inline validation or list items.
Warning feedback with no shadow. Low-emphasis warnings that don't require strong visual separation.
Success messages, confirmations, completed tasks. Green tint with matching border.
Error messages, destructive warnings, failed validations. Red tint with matching border.
Warnings, pending states, attention required. Orange tint with matching border.
Featured success content with medium shadow depth.
Featured error content with medium shadow depth.
Featured warning content with medium shadow depth.
High-priority success message with strong shadow.
Critical error requiring immediate attention.
High-priority warning with strong emphasis.
<div class="tw-card tw-card-positive tw-card-flat">...</div><div class="tw-card tw-card-positive">...</div><div class="tw-card tw-card-negative tw-card-elevated">...</div><div class="tw-card tw-card-caution tw-card-prominent">...</div>
Flexible Sections: Cards can contain header, body, and footer sections. Use header for titles/actions, body for main content, footer for metadata.
Simplest card structure. Just content, no header or footer. Use for standalone content blocks.
Header provides context or section label. Body contains the main content.
Complete card with all sections. Footer shows metadata or secondary actions.
<div class="tw-card"> <div class="tw-card-header">...</div> <div class="tw-card-body">...</div> <div class="tw-card-footer">...</div></div>
Title Sizes: Three title size variants using heading tokens. Small (h4), Default (h3), Large (h2). Choose based on card prominence and hierarchy.
Optional subtitle text
Uses h4 typography tokens. Best for compact cards or secondary information.
Optional subtitle text
Uses h3 typography tokens. Standard title size for most card use cases.
Optional subtitle text
Uses h2 typography tokens. Best for hero cards, wizards, or prominent actions.
<h3 class="tw-card-title-sm">Small Title</h3><h3 class="tw-card-title">Default Title</h3><h2 class="tw-card-title-lg">Large Title</h2><p class="tw-card-subtitle">Subtitle</p>
Compact Padding: Use .tw-card-sm for tighter spacing. Reduces padding in all sections while maintaining proportions.
Header/footer: px-4 py-3. Body: p-4. Default comfortable spacing for most use cases.
Header/footer: px-3 py-2.5. Body: p-3. Tighter spacing for dense layouts or sidebar cards.
<div class="tw-card tw-card-sm">...</div>
Hover & Focus States: Add .tw-card-interactive for clickable cards. Base cards elevate on hover, elevated/prominent cards increase shadow strength. Focus ring uses neutral color (not primary).
Hover to add subtle shadow. Click or tab to focus. Flat cards elevate to base level on hover.
Hover to elevate. Click or tab to focus. Base cards lift to elevated shadow level on hover.
Already elevated. Hover increases shadow strength (opacity). Focus adds neutral ring.
Highest elevation. Hover strengthens shadow. Use for primary action cards in wizards.
<div class="tw-card tw-card-flat tw-card-interactive" tabindex="0">...</div><div class="tw-card tw-card-interactive" tabindex="0">...</div>Selection Patterns: Cards with integrated checkboxes or radio buttons. Control positioned top-left when no header, or prepended to header content. Selection is indicated by control state only (no background change).
Checkbox floats in top-left corner when no header is present. Click anywhere to select.
Checkbox prepends to header content using flexbox. Label and control aligned horizontally.
Radio button floats in top-left corner. Use for mutually exclusive options.
Radio button prepended to header. Common pattern for plan selection or configuration choices.
Checkbox floats in top-left corner when no header is present. Click anywhere to select.
Checkbox prepends to header content using flexbox. Label and control aligned horizontally.
<div class="tw-card tw-card-selectable-checkbox"> <input type="checkbox" id="..."> <label for="..." class="tw-card-selectable-hitbox-full"></label> <div class="tw-card-body">...</div></div>
Media Component: Full-width cover images using .tw-card-cover. Natural image dimensions (no enforced aspect ratio). Border-radius automatically inherited based on position (first child, last child, or only child).
Beautiful waterfront location with modern facilities and easy transport access.
Historic building in the heart of the city. Close to parks, libraries, and cultural venues.
<img src="..." class="tw-card-cover" alt="...">
Flush Content: Use .tw-card-body.tight for zero-padding body. Perfect for tables or lists that extend to card edges. Automatically adds minimal top/bottom padding when header/footer are absent.
| Name | Status | Date |
|---|---|---|
| Sarah Johnson | Submitted | 2026-01-15 |
| Michael Chen | Under Review | 2026-01-14 |
| Emma Wilson | Approved | 2026-01-13 |
<div class="tw-card-body tight"> <table>...</table></div>
Real-World Pattern: Combines prominent elevation, high-priority accent, and large title. Common for multi-step processes, important decisions, or primary action cards.
Complete your enrollment in three simple steps. We'll guide you through each stage of the process.
<div class="tw-card tw-card-prominent tw-card-high-priority"> <div class="tw-card-body"> <h2 class="tw-card-title-lg">...</h2> ...content... </div></div>
Quick Reference
Base & Elevation: .tw-card-flat | .tw-card | .tw-card-elevated | .tw-card-prominent | .tw-card-high-priority
Sections: .tw-card-header | .tw-card-body | .tw-card-body.tight | .tw-card-footer
Size: .tw-card-sm
Semantic: .tw-card-positive | .tw-card-negative | .tw-card-caution
Typography: .tw-card-title-sm | .tw-card-title | .tw-card-title-lg | .tw-card-subtitle
Interactive: .tw-card-interactive | .tw-card-selectable-checkbox | .tw-card-selectable-radio
Media: .tw-card-cover