# Card

> A bordered surface with a title, body and footer.

```tsx
import { Badge, Button, Card } from '@brand-studio/ui';

export default function CardDemo() {
  return (
    <div style={{ width: '100%', maxWidth: 360 }}>
      <Card
        title="Ethiopia Guji"
        description="Washed, light roast. Peach, jasmine and black tea."
        footer={<><Button>Add to basket</Button><Button tone="secondary">Details</Button></>}
      >
        <div style={{ display: 'flex', gap: 8 }}><Badge>250 g</Badge><Badge tone="outline">Whole bean</Badge></div>
      </Card>
    </div>
  );
}
```

## Installation

```sh
npm install @brand-studio/ui
```

React 18 or 19 is a peer dependency. Import the stylesheet once and wrap the app in a brand theme:

```tsx
import '@brand-studio/ui/styles.css';
import { BrandTheme, Card } from '@brand-studio/ui';
import brand from './brand.json';

<BrandTheme palette={brand.tokens} mode="system">
  {/* your app */}
</BrandTheme>
```

## Usage

```tsx
import { Card } from '@brand-studio/ui';
```

```tsx
<Card title="Ethiopia Guji" description="Washed, light roast." footer={<Button>Add</Button>}>
  …
</Card>
```

## Accessibility

- Renders an `<article>` with the title as an `<h3>`.

## API Reference

| Prop | Type | Default |
|---|---|---|
| `title?` | `React.ReactNode` | – |
| `description?` | `React.ReactNode` | – |
| `footer?` | `React.ReactNode` | – |

Source: https://brandstudio.js.org/docs/components/card/
