# Flip Card — React Native component for Expo

> A two-sided card that turns over in 3D, lifting toward you half-way through.

Two-sided card that turns over in 3D on tap — it lifts toward you half-way and its shadow narrows as it goes edge-on, like a real card. Flips left/right or top/bottom, controlled or uncontrolled, and swaps faces exactly at 90° so Android never flickers.

- Docs: https://expokit.in/docs/components/flip-card
- Tier: Free
- Also called: flip card, card flip animation, flashcard
- Category: 3D
- Platforms: iOS, Android, web
- Expo Go: yes, no development build needed
- Uses ExpoKit items: kit
- Variants: Polaroid, Recipe, Profile, Flashcard

## Installation

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

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

The CLI copies the source into your project (you own the code).

Import: `import { FlipCard } from "@/components/ui/flip-card";`

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `front` | `ReactNode` | — | First face. Sets the card's size. |
| `back` | `ReactNode` | — | Second face, filling the same box. |
| `flipped` | `boolean` | — | Controlled side — true shows the back. |
| `defaultFlipped` | `boolean` | `false` | Uncontrolled initial side. |
| `onFlip` | `(flipped: boolean) => void` | — | Fires when tapped. |
| `direction` | `"horizontal" \| "vertical"` | `"horizontal"` | Turn around the vertical or the horizontal axis. |
| `trigger` | `"press" \| "none"` | `"press"` | Flip on tap, or only through `flipped`. |
| `perspective` | `number` | `1000` | Depth of the effect — smaller is more dramatic. |
| `radius` | `number` | `20` | Corner radius of both faces. |
| `shadow` | `boolean` | `true` | Soft shadow that narrows as the card turns edge-on. |
| `accessibilityLabel` | `string` | — | Label for screen readers. |
| `labels` | `{ toBack?: string; toFront?: string }` | `English hints` | Screen-reader hints for each side. |
| `style` | `StyleProp<ViewStyle>` | — | Style for the root (width, margins). |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |

## Behaviour & accessibility

- **Touch**: Tap to flip. With trigger 'none' it only turns when you change flipped from outside.
- **Motion**: A gentle spring turns the card around its vertical or horizontal axis while the shadow beneath narrows as it goes edge-on. Faces swap exactly at 90° so Android never flickers.
- **Screen readers**: The card is a button whose hint says which side is showing, with an expanded state when flipped. The hidden face is hidden from screen readers.

## FAQ

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

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

### Does Flip Card work in Expo Go?

Yes. Flip Card runs in Expo Go on iOS and Android with no development build.

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

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

### Is Flip Card free?

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

## More

- Live preview, variants and code: https://expokit.in/docs/components/flip-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
