Components / effect

Flip Card

v1.0.0 · premium

A two-sided card that flips on hover or focus, and toggles with a tap, Enter or Space.

Flip Card demo

Implementation

A two-sided card that flips on hover or focus, and toggles with a tap, Enter or Space.

Framework
React 19.3.1 with TypeScript
Motion
Native CSS and browser APIs. No GSAP required.
Available modes
build
Version
1.0.0 · published

Source code

Download source ZIP
export function FlipCard({ front, back, label, ink, paper, className }: {
  front: ReactNode;
  back: ReactNode;

Quality evidence

Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .

Changelog

v1.0.0 · A two-sided card that flips on hover or focus, and toggles with a tap, Enter or Space.

Frequently asked questions

How do touch and keyboard visitors flip it?

The card is a button. A tap, Enter or Space toggles it, and keyboard focus flips it too. aria-pressed reflects the state.

Why must the front and back be phrasing content?

Because the card is a single button, which can only contain phrasing content such as spans and images. Use spans styled as blocks for layout.