# Cards Concept's cards use custom styling with specific borders, shadows, and spacing. Cards are the primary content containers throughout the template. ## Concept Card Styling ```scss // From Concept's _cards.scss .card { background: #fff; border: 1px solid #e6e6f2; border-radius: 4px; box-shadow: 0px 0px 4px 0px rgba(82, 63, 105, 0.05); margin-bottom: 30px; transition: all 0.3s ease; .card-header { background-color: #fff; border-bottom: 1px solid #e6e6f2; padding: 20px 30px; font-weight: 700; font-size: 16px; color: #3d405c; font-family: 'Circular Std', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; } .card-body { padding: 30px; } } ``` ## Card Components ### Card Header & Footer ```html
Featured
Special title treatment

With supporting text below.

``` ### Card with Image ```html
...
Card title

Card content

...
Card title

Overlay content

``` ## Card Variations ### Bordered Cards ```html
Header
Primary card

Example text content.

``` ### Background Colors ```html
Primary card

White text on colored background.

``` ### Card without Border ```html
Borderless Card

Card with shadow instead of border.

``` ## Concept Dashboard Cards ### Finance Metric Card Used in the Finance Dashboard with sparkline charts: ```html
Total Income

$5,79,000

25%
``` ### Revenue Card with Sparkline ```scss // Concept's revenue card styling .card.revenue-card { position: relative; overflow: hidden; min-height: 180px; .sparkline-container { position: absolute; bottom: 0; left: 0; right: 0; top: 50%; z-index: 1; } } ``` ### Chart Card ```html
Sales Overview
``` ### Activity Card ```html
Recent Activity
``` ## Card Layouts ### Card Group ```html
Card 1
Card 2
Card 3
``` ### Card Grid ```html
Card 1
Card 2
``` ## Interactive Cards ### Clickable Card ```html
Clickable Card

Entire card is clickable.

``` ### Collapsible Card ```html
Collapsible Card
Card content that can be toggled.
``` ## Custom Card Styles ### Loading Card ```html
Loading...

Loading content...

``` ### Empty State Card ```html
No Data Available

There's nothing to display at the moment.

``` ## JavaScript Usage ### Dynamic Card Creation ```javascript function createStatCard(title, value, change, icon) { return `
${title}

${value}

${Math.abs(change)}%
`; } // Usage const container = document.getElementById('stats-container'); container.innerHTML = createStatCard('Revenue', '$12,345', 5.2, 'fa-solid fa-dollar-sign'); ``` ### Card State Management ```javascript // Toggle card loading state function setCardLoading(card, loading = true) { const cardBody = card.querySelector('.card-body'); if (loading) { cardBody.innerHTML = `
`; } else { // Restore content } } // Refresh card content async function refreshCard(cardId) { const card = document.getElementById(cardId); setCardLoading(card, true); try { const data = await fetchCardData(cardId); updateCardContent(card, data); } finally { setCardLoading(card, false); } } ``` ## Accessibility - Use semantic HTML structure - Provide appropriate headings hierarchy - Include alt text for images - Ensure sufficient color contrast - Make interactive cards keyboard accessible ## Best Practices ### DO: - Keep card content concise - Use consistent spacing - Group related information - Provide visual hierarchy - Test responsive behavior ### DON'T: - Don't overload cards with content - Don't mix too many card styles - Don't forget hover/focus states - Don't use cards for everything