# Card

> A compound card with header, content, and footer slots in four surface variants.

- Tier: free, MIT
- Category: Data display
- Docs: https://ui.mlola.com/docs/components/card

## Install

```bash
npx mlola-ui add card
```

```tsx
import { Card } from "@/components/ui/card";
```

## Props with fixed values

| Component | Prop | Values | Default | Description |
| --- | --- | --- | --- | --- |
| Card | `variant` | `default`, `elevated`, `glass`, `specular` | `default` |  |

## Example

```tsx
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";

export default function Example() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Team</CardTitle>
        <CardDescription>Four members, two pending invitations.</CardDescription>
      </CardHeader>
      <CardContent>Everyone can edit projects; only owners can change billing.</CardContent>
      <CardFooter>
        <Button size="sm">Invite</Button>
      </CardFooter>
    </Card>
  );
}
```

## The same markup without React

```html
<div class="ml-card" data-variant="default">
  <div class="ml-card-header">
    <h3 class="ml-card-title">Team</h3>
    <p class="ml-card-description">Four members, two pending invitations.</p>
  </div>
  <div class="ml-card-content">Everyone can edit projects; only owners can change billing.</div>
  <div class="ml-card-footer">
    <button class="ml-button" type="button" data-variant="primary" data-size="sm"><span class="ml-button-label">Invite</span></button>
  </div>
</div>
```
