About
Flexible card component with slots for header, media, content, actions, and footer. Supports outlined, elevated, and interactive variants with hover states.
Variants
<ars-card variant="elevated">
<span slot="header">Title</span>
Content...
<div slot="actions"><button>Action</button></div>
</ars-card>
Interactive (with media)
Posted 2 hours ago · São Paulo, SP
<ars-card interactive variant="elevated" href="/pets/123">
<img slot="media" src="photo.jpg" />
<span slot="header">Title</span>
Content...
<div slot="footer">Metadata</div>
</ars-card>
Padding Options
<ars-card padding="sm">...</ars-card>
<ars-card padding="lg">...</ars-card>
<ars-card padding="none">...</ars-card>
Event Monitor
Click the card above...
Theme Toggle
Usage
<ars-card
variant="elevated"
padding="md"
interactive
href="/pets/123"
>
<img slot="media" src="photo.jpg" />
<span slot="header">Lost Dog</span>
Last seen near downtown...
<div slot="footer">2 hours ago</div>
</ars-card>
<script>
const card = document.querySelector('ars-card');
card.addEventListener('ars-card:click', (e) => {
console.log('Card clicked:', e.detail.variant);
});
</script>