Applies to every preview on the site.
Installation
One command copies the source into your app — you own the code and can change anything.
After you add the file, import it like any local component:
import { FlipCard } from "@/components/ui/flip-card";Or add it with the CLI (installs any missing peers):
Usage
useKit(). Wrap your app in <KitProvider accent="#6366f1" radius={14}> to re-skin every component at once.Like this? There's a lot more in Pro Pro
12 full screens built from the same kit — install them the same way.
Props
| Prop | Type | Default |
|---|---|---|
| front First face. Sets the card's size. | ReactNode | — |
| back Second face, filling the same box. | ReactNode | — |
| flipped Controlled side — true shows the back. | boolean | — |
| defaultFlipped Uncontrolled initial side. | boolean | false |
| onFlip Fires when tapped. | (flipped: boolean) => void | — |
| direction Turn around the vertical or the horizontal axis. | "horizontal" | "vertical" | "horizontal" |
| trigger Flip on tap, or only through `flipped`. | "press" | "none" | "press" |
| perspective Depth of the effect — smaller is more dramatic. | number | 1000 |
| radius Corner radius of both faces. | number | 20 |
| shadow Soft shadow that narrows as the card turns edge-on. | boolean | true |
| accessibilityLabel Label for screen readers. | string | — |
| labels Screen-reader hints for each side. | { toBack?: string; toFront?: string } | English hints |
| style Style for the root (width, margins). | StyleProp<ViewStyle> | — |
| className Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. | string | — |
Customization
You own the source file — tune appearance with props (no fork required for most tweaks). For brand-wide colours and radius, wrap your app in KitProvider; for one-off looks, use the style props below.
Design theme
Open Design theme on the live preview — accent, corner radius and font update every variant instantly (same as KitProvider in your app).
Variants
Use the variant chips on the preview to switch examples; each maps to a demo you can copy from the Code tab.
Style props
React Native style and typed slots like fieldStyle, plus optional root className when you use NativeWind or Uniwind (cnProps from kit).
- style
- StyleProp<ViewStyle>Style for the root (width, margins).
- className
- stringTailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides.
Map tokens from your design system on Bring your design system or read Theming for KitProvider and NativeWind / Uniwind setup.
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.
Source
FAQ
How do I make a flip card in React Native?
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?
How do I add Flip Card to my Expo app?
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.