Skip to content

Gyroscopic Credit Card

A credit card that floats on a 3-axis gyroscope, gently precessing like a spinning top on hover. A 180° Y-spin reveals card details on the back featuring chip glint and metallic bevel.

Gyroscopic Credit Card

by FreeCsStyles Dev's

CardsSpin / Rotation / Flip
🌐🎨⚛️💚🅰️🔥☁️
#spin#rotation#gyroscope#credit-card#flip#3d#hover-tilt#metallic#cvv#card-flip

Embed this component

Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/gyroscopic-credit-card.

<iframe src="/embed/gyroscopic-credit-card" sandbox="allow-scripts" loading="lazy" title="Gyroscopic Credit Card" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>

Implementation code

Copy the HTML and CSS for Gyroscopic Credit Card, or grab a framework-specific implementation. The HTML and CSS variants are self-contained; framework variants assume that framework's project setup.

HTML
<div class="gyro-card">
  <div class="gyro-inner">
    <div class="gyro-chip"></div>
    <div class="gyro-number">•••• •••• •••• 4829</div>
    <div class="gyro-holder">ALEX MORGAN</div>
    <div class="gyro-expiry">09/28</div>
  </div>
</div>
CSS
.gyro-card { width: 220px; min-height: 290px; border-radius: 12px; background: linear-gradient(145deg, #1a1a2e, #16213e); border: 1.5px solid rgba(180,160,140,0.15); transform-style: preserve-3d; transition: transform 0.4s ease; }
.gyro-card:hover { transform: rotateY(180deg); }
.gyro-inner { backface-visibility: hidden; padding: 20px; }
.gyro-chip { width: 40px; height: 30px; background: linear-gradient(135deg, #d4a574, #c4955a); border-radius: 4px; }
.gyro-number { font-size: 18px; font-weight: 700; color: rgba(255,255,255,0.9); margin-top: 30px; letter-spacing: 2px; }
.gyro-holder { font-size: 12px; color: rgba(255,255,255,0.6); text-transform: uppercase; }
.gyro-expiry { font-size: 10px; color: rgba(255,255,255,0.4); }
Tailwind CSS
<div class="group w-[220px] min-h-[290px] rounded-xl bg-gradient-to-br from-[#1a1a2e] to-[#16213e] border border-amber-800/15 preserve-3d transition-transform duration-500 [transform-style:preserve-3d] group-hover:[transform:rotateY(180deg)]">
  <div class="backface-hidden p-5">
    <div class="w-10 h-7 rounded bg-gradient-to-br from-amber-500 to-amber-600"></div>
    <div class="text-lg font-bold text-white/90 tracking-wider mt-8">•••• •••• •••• 4829</div>
    <div class="text-xs text-white/60 uppercase mt-2">ALEX MORGAN</div>
    <div class="text-[10px] text-white/40 mt-1">09/28</div>
  </div>
</div>
React
import React, { useRef, useState } from 'react';
import { motion, useMotionValue, useSpring } from 'framer-motion';

export function GyroscopicCreditCard({ width = 220, cardNumber = '•••• •••• •••• 4829', cardHolder = 'ALEX MORGAN', expiry = '09/28' }) {
  const ref = useRef(null);
  const [isFlipped, setIsFlipped] = useState(false);
  const x = useMotionValue(0);
  const y = useMotionValue(0);
  const rotateX = useSpring(y, { damping: 25, stiffness: 250 });
  const rotateY = useSpring(x, { damping: 25, stiffness: 250 });
  const handleMouseMove = (e) => {
    if (!ref.current) return;
    const rect = ref.current.getBoundingClientRect();
    x.set(-((e.clientX - rect.left - rect.width / 2) / (rect.width / 2)) * 10);
    y.set(((e.clientY - rect.top - rect.height / 2) / (rect.height / 2)) * 10);
  };
  return (
    <div onMouseEnter={() => {}} onMouseLeave={() => { x.set(0); y.set(0); }}>
      <motion.div ref={ref} onMouseMove={handleMouseMove} onClick={() => setIsFlipped(!isFlipped)}
        animate={{ rotateY: isFlipped ? 180 : 0 }} transition={{ type: 'spring', stiffness: 260, damping: 20 }}
        style={{ transformStyle: 'preserve-3d' }} className="relative cursor-pointer">
        <motion.div className="relative overflow-hidden rounded-xl" style={{ width, minHeight: 290, background: 'linear-gradient(145deg, #1a1a2e, #16213e)', border: '1.5px solid rgba(180,160,140,0.15)' }}>
          <div className="p-5 space-y-4 backface-hidden">
            <div className="w-10 h-7 rounded" style={{ background: 'linear-gradient(135deg, #d4a574, #c4955a)' }}></div>
            <div className="text-lg font-bold tracking-wider" style={{ color: 'rgba(255,255,255,0.9)' }}>{cardNumber}</div>
            <div className="text-xs uppercase" style={{ color: 'rgba(255,255,255,0.6)' }}>{cardHolder}</div>
            <div className="text-[10px]" style={{ color: 'rgba(255,255,255,0.4)' }}>{expiry}</div>
          </div>
        </motion.div>
      </motion.div>
    </div>
  );
}

Where Gyroscopic Credit Card fits

  • Credit Cards
  • Membership Cards
  • ID Badges
  • Payment UI
  • Loyalty Cards

Interaction states & animations

  • 360° Y-axis spin
  • 3-axis gyroscope wobble
  • 180° flip reveal
  • Metallic sweep
  • Shimmer particles

Topics

  • #spin
  • #rotation
  • #gyroscope
  • #credit-card
  • #flip
  • #3d
  • #hover-tilt
  • #metallic
  • #cvv
  • #card-flip

Accessibility notes

Animations respect prefers-reduced-motion. Card details accessible via click as alternative to hover flip.

Browser support

  • Chrome 76+
  • Firefox 90+
  • Safari 13+
  • Edge 79+