# Card — React Native component for Expo

> A composable card that springs down on press, with a spotlight that follows your finger.

Composable surface — Header, Title, Description, Content, Media, Footer — in default, outline and elevated styles. Pressable cards spring down and can light up with a spotlight that follows your finger or a glowing accent border.

- Docs: https://expokit.in/docs/components/card
- Tier: Free
- Also called: card view, product card, content card
- Category: Display
- Platforms: iOS, Android, web
- Expo Go: yes, no development build needed
- npm dependencies: react-native-svg
- Uses ExpoKit items: kit
- Variants: Default, Variants, Spotlight, Selectable Plans

## Installation

Run once per project: `npx @expokit/cli@latest init` (shared theme + KitProvider). Then:

```bash
npx @expokit/cli@latest add card
```

The CLI copies the source into your project (you own the code) and installs react-native-svg.

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

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"default" \| "outline" \| "elevated"` | `"default"` | Surface style. Glass is translucent with a light edge — place it over colour or imagery. |
| `onPress / onLongPress` | `(e) => void` | — | Makes the card a button with a spring press. |
| `pressable` | `boolean` | `false` | Spring press without an onPress. |
| `highlight` | `"none" \| "spotlight" \| "border"` | `"none"` | Radial glow that tracks the finger, or an accent border that glows in. |
| `accent` | `string` | `theme accent` | Highlight colour. |
| `padding` | `number` | `18` | Inner padding. |
| `gap` | `number` | `14` | Space between sections. |
| `disabled` | `boolean` | `false` | Dims and blocks presses. |
| `Card.Header action` | `ReactNode` | — | Element pinned to the header's top-right. |
| `Card.Title / Description numberOfLines` | `number` | — | Clamp the text to this many lines with an ellipsis. |
| `Card.Content / Footer` | `{ children, style? }` | — | Plain section view / bottom row of actions (row, 10pt gap); `style` overrides either. |
| `Card.Media source / height` | `ImageSource / number` | `— / 168` | Full-bleed image; place it first. |
| `style` | `StyleProp<ViewStyle>` | — | Style for the card surface (merged after the variant background, border and radius). |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |

## Behaviour & accessibility

- **Touch**: With onPress, onLongPress or pressable it scales down with a spring and bounces back on release.
- **Motion**: highlight="spotlight" springs in a soft glow under your finger; highlight="border" fades in a glowing accent ring.
- **Screen readers**: Becomes a button with disabled state when it has onPress or onLongPress. Card.Title is a header.
- **Web**: Shows a pointer cursor when it has onPress.

## FAQ

### How do I make a card view in React Native?

Use ExpoKit's Card: run npx @expokit/cli@latest add card in your Expo or React Native project and it copies a ready-made card view into your app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.

### Does Card work in Expo Go?

Yes. Card runs in Expo Go on iOS and Android with no development build — its packages (react-native-svg) are all included in Expo Go.

### How do I add Card to my Expo app?

Run npx @expokit/cli@latest add card in your project. The CLI copies the component's source into your app and installs react-native-svg, so the code is yours to change.

### Is Card free?

Yes. Card is free: its full source is on this page and the CLI installs it without an account.

### Can I change how Card looks?

Yes. It takes its colours, radius and light / dark mode from useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.

## More

- Live preview, variants and code: https://expokit.in/docs/components/card
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
