Overview
Flip cards stack two faces on the same plane and reveal one side at a time by rotating the parent 180 degrees. The trick is backface-visibility: hidden on each face: when a face turns past 90 degrees its back faces the camera, and hiding the backface keeps the other face from ghosting through. Three variants ship: a horizontal Y-axis flip (the canonical profile card), a vertical X-axis flip (product reveal), and a Quiet Swap opacity crossfade for reduced motion.
When to use it
Reach for flip cards as a compact secondary view for same-thing content: stats on the back of a player card, terms on the back of a product tile, options on the back of a loyalty card. Skip it when the back face is wholly unrelated content — that should be a separate page or modal, not a magic flip. Skip flip cards in long lists; the cumulative rotation gets disorienting at scale.
How it works
Wrap the two faces in a container with perspective (the camera) and inside that an inner with transform-style: preserve-3d + a rotateY(0deg) transition. Position both faces absolutely on the same plane with backface-visibility: hidden. The back face starts pre-rotated by rotateY(180deg) so when the inner rotates 180 the back face arrives at 0 (visible) and the front face arrives at 180 (hidden by its backface). The flip is just a single transition on the inner’s transform — toggled by :hover, :focus-within, or a JS class.
Production gotchas
On :hover only, keyboard users can never see the back face — pair :hover with :focus-within always. Wrapping the card in a <button> or<a> gives you native focus + click without extra JS. Some Safari versions still need explicit -webkit-backface-visibility: hidden alongside the unprefixed version. If the back face shows a thin sliver of the front during rotation, that is a subpixel anti-alias artifact — add transform: translateZ(0.01px) to each face to force a unique z-depth.
Accessibility
Both faces should contain real DOM content (text, links) so screen readers can read the entire card regardless of which side is visible. prefers-reduced-motion: reduce replaces the rotation with an opacity crossfade, which is what the Quiet Swap variant ships as the reduced-motion-safe primary. Keyboard users need :focus-within on the card so Tab triggers the flip the same way a mouse hover would.
References
Implementation depth
The front and back faces should share one 3D plane with backface-visibility hidden. Drive the rotation from the parent so hover and focus-within produce the same state rather than building separate mouse and keyboard paths.
Avoid putting essential reading content only on the back face. On touch devices and reduced motion settings, the fallback should expose the information without requiring a precise hover state or a disorienting 180-degree flip.