Special/FlipCard

FlipCard

True CSS 3D flip card with front and back faces. Uses preserve-3d and backface-visibility: hidden for a physically accurate flip — not a fade or crossfade.

import { FlipCard } from "@animui/ui"

Hover flip

Front

Back

Hover flips it back

Click flip / vertical

Click me

Flipped!

Click to flip back

Important: set dimensions

FlipCard is dimension-agnostic — it fills whatever size you give it via className. Always set explicit width and height so both faces know their bounding box.

Props

PropTypeDefaultDescription
frontReactNodeContent for the front face.
backReactNodeContent for the back face.
trigger"hover" | "click""hover"What triggers the flip.
direction"horizontal" | "vertical""horizontal"Axis of the flip rotation.
durationnumber0.5Flip duration in seconds.
defaultFlippedbooleanfalseStart in the flipped state.
onFlip(flipped: boolean) => voidCallback when flip state changes.
classNamestringApplied to the outer container — set width and height here.
© 2026 Steal Shadow. MIT License.Report an issue