UIPin
ComponentsIconsIllustrationsMotionTemplatesApps
Boards
UIPin

Free, open-source UI components, icons, illustrations, motion, templates and apps, in one search. Every item links to its source and licence.

UIPin is free. If it saved you time, you can keep it running:

Buy me a coffee
ComponentsIconsIllustrationsMotionTemplatesAppsLibrariesCompareNew this weekMCP for agentsBoardsPrivacy

Components, icons and artwork belong to their authors and are shown under their open-source licences.

Eldora UI/Card Flip Hover

Overlays
1 of 4
Compiling

Theme it

Every preview, live

Brand colour

Corner radius

Font

Recolours shadcn’s tokens, Tailwind’s accent colours and colours set in the code. Red, amber and green classes stay, since they usually mean error, warning or success.

4 versions·4 librariesCompare all cards →

  • Eldora UI
  • 8bitcn
  • HextaUI
  • shadcn/ui

Card Flip Hover

A card flip hover component.

npx shadcn@latest add https://eldoraui.site/r/card-flip-hover.json
Open in v0 Docs Repo
Library
Eldora UI
License
MIT
Stack
React · Tailwind CSS
Size
49 lines
Demo
From Eldora UI

Code

registry/eldoraui/card-flip-hover.tsx

"use client"

import React, { useState } from "react"

interface CardFlipHoverProps {
  imageUrl: string
}

export const CardFlipHover = ({ imageUrl }: CardFlipHoverProps) => {
  const [isFlipped, setIsFlipped] = useState(false)

  const handleHover = () => {
    if (!isFlipped) {
      setIsFlipped(true)
      setTimeout(() => setIsFlipped(false), 700)
    }
  }

  return (
    <div className="h-60 w-44 [perspective:1000px]" onMouseEnter={handleHover}>
      <div
        className={`relative h-full w-full transition-all duration-700 [transform-style:preserve-3d] ${
          isFlipped
            ? "[transform:rotateY(180deg)_translateY(-40px)]"
            : "[transform:rotateY(0deg)_translateY(0px)]"
        }`}
      >
        {/* Front Side */}
        <div className="absolute h-full w-full overflow-hidden rounded-xl shadow-xl [backface-visibility:hidden]">
          <img
            src={imageUrl}
            alt="Front"
            className="h-full w-full object-cover"
          />
        </div>

        {/* Back Side */}
        <div className="absolute flex h-full w-full [transform:rotateY(180deg)] items-center justify-center overflow-hidden rounded-xl bg-cyan-600 text-xl font-bold text-white shadow-xl [backface-visibility:hidden]">
          <img
            src={imageUrl}
            alt="Back"
            className="h-full w-full object-cover"
          />
        </div>
      </div>
    </div>
  )
}

More like this

Safari Browser

Eldora UI·Media & 3D

Ipad

Eldora UI·Media & 3D

Bubble Background

Animate UI·BackgroundsMIT+

Iphone

Magic UI·Media & 3D

Gradient Background

Animate UI·BackgroundsMIT+

Drape Background

Kokonut UI·Backgrounds

Holo Card

React Bits·CardsMIT+

Iphone 17 Pro

Eldora UI·Media & 3D

Novatrix Background

Eldora UI·Backgrounds

Card Nav

React Bits·NavigationMIT+

Ribbons

React Bits·Cursor & effectsMIT+

Border Trail

Motion Primitives·Cursor & effects

Glow Effect

Motion Primitives·Cursor & effects

Depth Carousel

React Bits·Media & 3DMIT+

Dock

Cult UI·Navigation