Skip to content

Holocube Card

The card is a glowing wireframe cube floating in space. Content is mapped onto each of the six internal faces. Hover rotates the cube smoothly toward the cursor. Clicking on a face brings it forward and expands it to fill the card area. Edges pulse gently when new content is available on a hidden face.

Holocube Card

by FreeCsStyles Dev's

CardsHologram
🌐🎨⚛️💚🅰️🔥☁️
#cube#wireframe#holocube#3d#hologram#rotation#face#sci-fi#floating#tech

Embed this component

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

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

Implementation code

Copy the HTML and CSS for Holocube 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="holocube-card">
  <div class="holocube-container">
    <div class="holocube-face" style="transform: rotateY(0deg) translateZ(45px);"></div>
    <div class="holocube-face" style="transform: rotateY(180deg) translateZ(45px);"></div>
    <div class="holocube-face" style="transform: rotateX(90deg) translateZ(45px);"></div>
    <div class="holocube-face" style="transform: rotateX(-90deg) translateZ(45px);"></div>
    <div class="holocube-face" style="transform: rotateY(90deg) translateZ(45px);"></div>
    <div class="holocube-face" style="transform: rotateY(-90deg) translateZ(45px);"></div>
  </div>
  <div class="holocube-content">
    <div class="holocube-header">
      <div><div class="holocube-title">Holocube</div><div class="holocube-sub">6 Faces</div></div>
      <div class="holocube-status">⬡ IDLE</div>
    </div>
    <div class="holocube-grid">
      <div class="holocube-stat"><div class="holocube-stat-val">6</div><div class="holocube-stat-lbl">Faces</div></div>
      <div class="holocube-stat"><div class="holocube-stat-val">SYNCED</div><div class="holocube-stat-lbl">Status</div></div>
    </div>
    <div class="holocube-hint">[▼ hover to rotate cube]</div>
  </div>
</div>
CSS
.holocube-card { position: relative; width: 220px; min-height: 300px; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #050a18, #02040e); border: 1.5px solid rgba(6,182,212,0.08); box-shadow: 0 10px 30px rgba(0,0,0,0.3); cursor: pointer; }
.holocube-card:hover { box-shadow: 0 0 30px rgba(6,182,212,0.08), 0 15px 40px rgba(0,0,0,0.4); }
.holocube-container { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; perspective: 500px; }
.holocube-face { position: absolute; width: 80px; height: 80px; border: 1px solid rgba(6,182,212,0.18); background: rgba(6,182,212,0.03); backface-visibility: hidden; }
.holocube-content { position: absolute; inset-x: 0; bottom: 0; z-index: 10; padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent); }
.holocube-header { display: flex; justify-content: space-between; align-items: center; }
.holocube-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); }
.holocube-sub { font-size: 9px; color: rgba(6,182,212,0.44); }
.holocube-status { padding: 2px 8px; border-radius: 2px; font-size: 7px; font-weight: 700; letter-spacing: 0.1em; color: #22d3ee; background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.2); }
.holocube-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.holocube-stat { text-align: center; padding: 6px 4px; border-radius: 8px; background: rgba(6,182,212,0.03); border: 1px solid rgba(6,182,212,0.06); }
.holocube-stat-val { font-size: 10px; font-weight: 600; color: #22d3ee; }
.holocube-stat-lbl { font-size: 7px; margin-top: 2px; color: rgba(255,255,255,0.2); }
.holocube-hint { text-align: center; font-size: 7px; font-family: monospace; color: rgba(6,182,212,0.2); margin-top: 8px; }
Tailwind CSS
<div class="group relative w-[220px] min-h-[300px] rounded-2xl overflow-hidden border border-cyan-500/20 shadow-lg group-hover:shadow-[0_0_30px_rgba(6,182,212,0.08),0_15px_40px_rgba(0,0,0,0.4)] bg-gradient-to-b from-[#050a18] to-[#02040e] cursor-pointer">
  <div class="absolute inset-0 flex items-center justify-center pointer-events-none" style="perspective: 500px;">
    <div class="relative w-20 h-20" style="transform-style: preserve-3d;">
      <div class="absolute inset-0 border border-cyan-500/20 bg-cyan-500/10 rounded-sm" style="transform: rotateY(0deg) translateZ(40px);"></div>
      <div class="absolute inset-0 border border-cyan-500/20 bg-cyan-500/10 rounded-sm" style="transform: rotateY(180deg) translateZ(40px);"></div>
      <div class="absolute inset-0 border border-cyan-500/20 bg-cyan-500/10 rounded-sm" style="transform: rotateX(90deg) translateZ(40px);"></div>
      <div class="absolute inset-0 border border-cyan-500/20 bg-cyan-500/10 rounded-sm" style="transform: rotateX(-90deg) translateZ(40px);"></div>
      <div class="absolute inset-0 border border-cyan-500/20 bg-cyan-500/10 rounded-sm" style="transform: rotateY(90deg) translateZ(40px);"></div>
      <div class="absolute inset-0 border border-cyan-500/20 bg-cyan-500/10 rounded-sm" style="transform: rotateY(-90deg) translateZ(40px);"></div>
    </div>
  </div>
  <div class="absolute inset-x-0 bottom-0 z-10 p-5 space-y-2 bg-gradient-to-t from-black/60 to-transparent">
    <div class="flex items-center justify-between">
      <div><p class="text-sm font-bold text-white/90">Holocube</p><p class="text-[9px] text-cyan-400/50">6 Faces</p></div>
      <div class="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest text-cyan-400 bg-cyan-500/10 border border-cyan-500/20">⬡ IDLE</div>
    </div>
    <div class="h-px bg-gradient-to-r from-transparent via-cyan-500/10 to-transparent"></div>
    <div class="grid grid-cols-2 gap-2">
      <div class="text-center py-1.5 rounded-lg bg-cyan-500/10 border border-cyan-500/20"><p class="text-[10px] font-semibold text-cyan-400">6</p><p class="text-[7px] mt-0.5 text-white/20">Faces</p></div>
      <div class="text-center py-1.5 rounded-lg bg-cyan-500/10 border border-cyan-500/20"><p class="text-[10px] font-semibold text-cyan-400">SYNCED</p><p class="text-[7px] mt-0.5 text-white/20">Status</p></div>
    </div>
    <div class="text-center"><span class="text-[7px] font-mono text-cyan-400/30">[▼ hover to rotate cube]</span></div>
  </div>
</div>
React
import React, { useRef, useState, useEffect } from 'react';
import { motion, useMotionValue, useSpring, AnimatePresence } from 'framer-motion';

export function HolocubeCard({ cubeName = 'Holocube', width = 220 }) {
  const ref = useRef(null);
  const [isHovered, setIsHovered] = useState(false);
  const [expandedFace, setExpandedFace] = useState(null);
  const [newContentOn, setNewContentOn] = useState([]);
  const [cubeRotateY, setCubeRotateY] = useState(0);
  const [cubeRotateX, setCubeRotateX] = useState(0);
  const x = useMotionValue(0);
  const y = useMotionValue(0);
  const rotateX = useSpring(y, { damping: 25, stiffness: 200 });
  const rotateY = useSpring(x, { damping: 25, stiffness: 200 });
  const faceIcons = ['◆', '⬡', '✦', '⟡', '⬢', '◇'];
  const faceColors = ['#22d3ee', '#a78bfa', '#f472b6', '#34d399', '#fbbf24', '#fb923c'];
  useEffect(() => {
    const interval = setInterval(() => {
      const fi = Math.floor(Math.random() * 6);
      setNewContentOn((prev) => prev.includes(fi) ? prev : [...prev, fi]);
      setTimeout(() => setNewContentOn((prev) => prev.filter((f) => f !== fi)), 5000);
    }, 4000);
    return () => clearInterval(interval);
  }, []);
  const handleMouseMove = (e) => {
    if (!ref.current) return;
    const rect = ref.current.getBoundingClientRect();
    x.set(-((e.clientX - rect.left - rect.width / 2) / (rect.width / 2)) * 6);
    y.set(((e.clientY - rect.top - rect.height / 2) / (rect.height / 2)) * 6);
    setCubeRotateX(((e.clientX - rect.left) / rect.width - 0.5) * 60);
    setCubeRotateY(((e.clientY - rect.top) / rect.height - 0.5) * -30);
  };
  const handleFaceClick = (faceIdx, e) => {
    e.stopPropagation();
    setExpandedFace(expandedFace === faceIdx ? null : faceIdx);
    setNewContentOn((prev) => prev.filter((f) => f !== faceIdx));
  };
  return (
    <div onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => { setIsHovered(false); x.set(0); y.set(0); setCubeRotateX(0); setCubeRotateY(0); }}>
      <motion.div ref={ref} onMouseMove={handleMouseMove} onClick={() => expandedFace !== null && setExpandedFace(null)} style={{ rotateX, rotateY, transformStyle: 'preserve-3d' }} className="relative cursor-pointer">
        <motion.div className="relative overflow-hidden rounded-2xl" style={{ width, minHeight: 300, background: 'linear-gradient(160deg, #050a18, #02040e)', border: '1.5px solid rgba(6,182,212,0.08)' }}
          animate={{ boxShadow: isHovered ? '0 0 30px rgba(6,182,212,0.08), 0 15px 40px rgba(0,0,0,0.4)' : '0 10px 30px rgba(0,0,0,0.3)' }} transition={{ type: 'spring', stiffness: 280, damping: 20 }}>
          <AnimatePresence>{expandedFace !== null && (
            <motion.div className="absolute inset-0 z-10 flex flex-col items-center justify-center pointer-events-none" style={{ background: 'linear-gradient(180deg, #050a18E0, #02040eE0)' }}
              initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} transition={{ duration: 0.2 }}>
              <motion.div className="text-3xl mb-1" style={{ color: faceColors[expandedFace % 6] }} initial={{ scale: 0, rotate: -180 }} animate={{ scale: 1, rotate: 0 }} transition={{ type: 'spring', stiffness: 200, damping: 12 }}>{faceIcons[expandedFace % 6]}</motion.div>
              <motion.p className="text-[10px] font-bold" style={{ color: '#22d3ee' }} initial={{ opacity: 0, y: 5 }} animate={{ opacity: 1, y: 0 }} transition={{ delay: 0.15 }}>FACE {expandedFace + 1}</motion.p>
              <motion.p className="text-[6px] mt-2" style={{ color: 'rgba(6,182,212,0.3)' }} initial={{ opacity: 0 }} animate={{ opacity: 1 }} transition={{ delay: 0.4 }}>tap to collapse</motion.p>
            </motion.div>
          )}</AnimatePresence>
          <div className="absolute inset-0 flex items-center justify-center pointer-events-none" style={{ perspective: '500px' }}>
            <motion.div className="relative" style={{ width: 90, height: 90, transformStyle: 'preserve-3d', marginTop: -20 }}
              animate={{ rotateX: expandedFace !== null ? 0 : cubeRotateY, rotateY: expandedFace !== null ? 0 : cubeRotateX }} transition={{ type: 'spring', stiffness: 100, damping: 15 }}>
              {Array.from({ length: 6 }).map((_, i) => {
                const rots = [{ ry: 0, rz: 45 }, { ry: 180, rz: 45 }, { rx: 90, rz: 45 }, { rx: -90, rz: 45 }, { ry: 90, rz: 45 }, { ry: -90, rz: 45 }];
                const hasNew = newContentOn.includes(i);
                return (
                  <motion.div key={i} className="absolute inset-0 flex items-center justify-center rounded-sm"
                    style={{ transformStyle: 'preserve-3d', border: `1px solid ${hasNew ? faceColors[i % 6] : '#22d3ee'}30`, background: 'rgba(6,182,212,0.03)', backfaceVisibility: 'hidden', transform: `rotateY(${rots[i].ry}deg) rotateX(${rots[i].rx || 0}deg) translateZ(${rots[i].rz}px)` }}
                    animate={hasNew && expandedFace === null ? { borderColor: ['rgba(6,182,212,0.18)', `${faceColors[i % 6]}60`, 'rgba(6,182,212,0.18)'], boxShadow: ['0 0 0px transparent', `0 0 8px ${faceColors[i % 6]}40`, '0 0 0px transparent'] } : {}}
                    transition={{ duration: 1.5, repeat: hasNew && expandedFace === null ? Infinity : 0, ease: 'easeInOut' }} onClick={(e) => handleFaceClick(i, e)}>
                    <span className="text-[11px] pointer-events-auto cursor-pointer select-none" style={{ color: faceColors[i % 6] }}>{faceIcons[i % 6]}</span>
                  </motion.div>
                );
              })}
            </motion.div>
          </div>
          <div className="absolute inset-x-0 bottom-0 z-10 p-5 space-y-2" style={{ background: 'linear-gradient(0deg, rgba(0,0,0,0.6), transparent)' }}>
            <div className="flex items-center justify-between">
              <div><p className="text-sm font-bold" style={{ color: 'rgba(255,255,255,0.9)' }}>{cubeName}</p><p className="text-[9px]" style={{ color: 'rgba(6,182,212,0.44)' }}>6 Faces</p></div>
              <motion.div className="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest" style={{ background: 'rgba(6,182,212,0.1)', border: '1px solid rgba(6,182,212,0.2)', color: '#22d3ee' }} animate={isHovered ? { opacity: [0.6, 1, 0.6] } : {}} transition={{ duration: 1.5, repeat: isHovered ? Infinity : 0 }}>{expandedFace !== null ? `FACE ${expandedFace + 1}` : isHovered ? '⟡ ROTATE' : '⬡ IDLE'}</motion.div>
            </div>
            <div className="text-center"><span className="text-[7px] font-mono" style={{ color: 'rgba(6,182,212,0.2)' }}>{expandedFace !== null ? '[▼ click to collapse face]' : isHovered ? '[▼ click a face to expand]' : '[▼ hover to rotate cube]'}</span></div>
          </div>
        </motion.div>
      </motion.div>
    </div>
  );
}

Where Holocube Card fits

  • 3D navigation UI
  • Menu systems
  • Content organization
  • Sci-fi interfaces
  • Data cubes

Interaction states & animations

  • Wireframe cube rotation
  • Face expansion
  • Edge pulse notification
  • Cursor tracking rotation
  • Icon mapping

Topics

  • #cube
  • #wireframe
  • #holocube
  • #3d
  • #hologram
  • #rotation
  • #face
  • #sci-fi
  • #floating
  • #tech

Accessibility notes

The 3D rotation may be disorienting. Provide a flat mode for users with vestibular disorders. Ensure all face content is accessible without rotation.

Browser support

  • Chrome 90+
  • Firefox 105+
  • Safari 15+
  • Edge 90+