# Card

> Atom — orn-ui

> ⚠️ Requires <UIProvider>: This component (like every orn-ui component) must render inside a <UIProvider> ancestor, or it throws at runtime. See https://orn-ui-docs.vercel.app/getting-started.md

> Runs on Expo SDK 54, 55, 56 and 57, and on bare React Native >=0.81 with react >=19.1. No native modules — works in Expo Go, no prebuild.

## Installation

Install just this component (copies the source into your project, no npm dependency)
```bash
npx orn-ui add card
```

Or install the whole package and import it
```tsx
pnpm add orn-ui
import { Card } from 'orn-ui/card';
```

Depends on: core (theme + icons)

## Variants

### Default

```tsx
<Card>
  <Title>Invoice #1042</Title>
  <Body>Due in 5 days · $340.00</Body>
</Card>
```

### Composed

```tsx
<Card>
  <View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 8 }}>
    <Title>Invoice #1043</Title>
    <Badge label="PAID" variant="success" />
  </View>
  <KeyValueRow label="Total" value="$1,240.00" />
</Card>
```

### Custom style

```tsx
<Card style={{ backgroundColor: '#004cef', borderRadius: 24 }}>
  <Title style={{ color: '#fff' }}>Highlighted card</Title>
</Card>
```

## Full demo source

```tsx
const variants: VariantDef[] = [
  {
    label: 'Default',
    content: (
      <Card>
        <Title>Invoice #1042</Title>
        <Body>Due in 5 days · $340.00</Body>
      </Card>
    ),
  },
  {
    label: 'Composed',
    content: (
      <Card>
        <View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 8 }}>
          <Title>Invoice #1043</Title>
          <Badge label="PAID" variant="success" />
        </View>
        <KeyValueRow label="Total" value="$1,240.00" />
      </Card>
    ),
  },
  {
    label: 'Custom style',
    content: (
      <Card style={{ backgroundColor: '#004cef', borderRadius: 24 }}>
        <Title style={{ color: '#fff' }}>Highlighted card</Title>
      </Card>
    ),
  },
];
return <VariantList variants={variants} />;
```

## Props

| Name | Type | Default | Description |
|---|---|---|---|
| `style?` | `ViewStyle` | — | — |
