MeaChat
Docs / Card

Card

Cards are foundational containers that can be used for anything from feature lists to blog posts.

Usage

import Card from '~/components/ui/Card.astro';

<Card>
  <h3>Card Title</h3>
  <p>Card content...</p>
</Card>

Interactive Cards

By passing an href prop, the card becomes a clickable link with hover effects.

<Card href="/somewhere" class="group">
    <h4 class="flex items-center gap-2">
        Clickable Card 
        <ArrowRight class="group-hover:translate-x-1 transition-transform"/>
    </h4>
</Card>

Props

PropTypeDefaultDescription
hrefstringundefinedIf provided, renders as an anchor and adds hover styles.
asstringdiv (or a if href)The HTML tag to render.
classstringundefinedCustom classes.