Skip to content

Volumetric Voxel Card

The card is composed of thousands of tiny, floating light voxels forming a 3D volume. Content appears as denser clusters of voxels within the space. Hover passes a slice plane through the volume, revealing a 2D cross-section. Clicking rotates the entire voxel field 90 degrees, showing a completely different axis of data. Idle mode triggers slow, ambient rotation.

Volumetric Voxel Card

by FreeCsStyles Dev's

CardsHologram
🌐🎨⚛️💚🅰️🔥☁️
#voxel#volumetric#3d#hologram#slice#data#scientific#cyberpunk#floating#tech

Embed this component

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

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

Implementation code

Copy the HTML and CSS for Volumetric Voxel 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="voxel-card">
  <div class="voxel-volume">
    <div class="voxel-slice-line"></div>
    <div class="voxel-grid"></div>
  </div>
  <div class="voxel-content">
    <div class="voxel-header">
      <div><div class="voxel-title">Voxel Volume</div><div class="voxel-sub">32³ · Z-slice</div></div>
      <div class="voxel-status">IDLE</div>
    </div>
    <div class="voxel-grid-info">
      <div class="voxel-stat"><div class="voxel-stat-val">1</div><div class="voxel-stat-lbl">View Axis</div></div>
      <div class="voxel-stat"><div class="voxel-stat-val">0%</div><div class="voxel-stat-lbl">Slice Depth</div></div>
    </div>
    <div class="voxel-hint">[▼ hover to slice volume]</div>
  </div>
</div>
CSS
.voxel-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; }
.voxel-card:hover { box-shadow: 0 0 30px rgba(6,182,212,0.08), 0 15px 40px rgba(0,0,0,0.4); }
.voxel-volume { position: absolute; inset: 0; pointer-events: none; perspective: 400px; }
.voxel-slice-line { position: absolute; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, #22d3ee, transparent); filter: blur(1px); opacity: 0; top: 50%; }
.voxel-card:hover .voxel-slice-line { opacity: 0.6; }
.voxel-content { position: absolute; inset-x: 0; bottom: 0; z-index: 10; padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent); }
.voxel-header { display: flex; justify-content: space-between; align-items: center; }
.voxel-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); }
.voxel-sub { font-size: 9px; color: rgba(6,182,212,0.44); }
.voxel-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); }
.voxel-grid-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.voxel-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); }
.voxel-stat-val { font-size: 10px; font-weight: 600; color: #22d3ee; }
.voxel-stat-lbl { font-size: 7px; margin-top: 2px; color: rgba(255,255,255,0.2); }
.voxel-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 pointer-events-none" style="perspective: 400px;">
    <div class="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[90px] h-[90px]">
      <div class="absolute opacity-0 group-hover:opacity-60 w-full h-[1px] bg-gradient-to-r from-transparent via-cyan-400 to-transparent blur-sm" style="top: var(--slice-y, 50%);"></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">Voxel Volume</p><p class="text-[9px] text-cyan-400/50">32³ · Z-slice</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">1</p><p class="text-[7px] mt-0.5 text-white/20">View Axis</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">0%</p><p class="text-[7px] mt-0.5 text-white/20">Slice Depth</p></div>
    </div>
    <div class="text-center"><span class="text-[7px] font-mono text-cyan-400/30">[▼ hover to slice volume]</span></div>
  </div>
</div>
React
import React, { useRef, useState, useEffect } from 'react';
import { motion, useMotionValue, useSpring } from 'framer-motion';

export function VolumetricVoxelCard({ datasetName = 'Voxel Volume', width = 220 }) {
  const ref = useRef(null);
  const [isHovered, setIsHovered] = useState(false);
  const [rotation, setRotation] = useState(0);
  const [sliceProgress, setSliceProgress] = useState(0);
  const [idleAngle, setIdleAngle] = 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 });
  useEffect(() => {
    if (isHovered) return;
    const interval = setInterval(() => setIdleAngle((prev) => (prev + 0.5) % 360), 50);
    return () => clearInterval(interval);
  }, [isHovered]);
  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);
    const sliceY = Math.max(0, Math.min(1, (e.clientY - rect.top) / rect.height));
    setSliceProgress(sliceY);
  };
  const handleClick = () => setRotation((prev) => (prev + 90) % 360);
  const gridSize = 6;
  const voxels = Array.from({ length: gridSize * gridSize * gridSize }, (_, i) => {
    const z = Math.floor(i / (gridSize * gridSize));
    const y = Math.floor((i % (gridSize * gridSize)) / gridSize);
    const x = i % gridSize;
    const isContent = x >= 1 && x <= 4 && y >= 1 && y <= 4 && z >= 1 && z <= 4;
    return { x, y, z, opacity: isContent ? 0.6 + Math.random() * 0.4 : 0.15 + Math.random() * 0.25, size: isContent ? 3 + Math.random() * 2 : 1.5 + Math.random() * 1.5, isContent };
  });
  return (
    <div onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => { setIsHovered(false); x.set(0); y.set(0); setSliceProgress(0); }}>
      <motion.div ref={ref} onMouseMove={handleMouseMove} onClick={handleClick} 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 }}>
          <div className="absolute inset-0 overflow-hidden pointer-events-none" style={{ perspective: '400px' }}>
            <motion.div className="absolute" style={{ left: '50%', top: '45%', transformStyle: 'preserve-3d', transform: 'translate(-50%, -50%)' }}
              animate={{ rotateY: rotation + idleAngle + (isHovered ? sliceProgress * 20 : 0) }} transition={{ type: 'spring', stiffness: 100, damping: 20 }}>
              <motion.div className="absolute" style={{ width: 120, height: 1, background: 'linear-gradient(90deg, transparent, #22d3ee, transparent)', left: -60, top: (sliceProgress - 0.5) * 80, opacity: isHovered ? 0.6 : 0, filter: 'blur(1px)' }} />
              {voxels.map((voxel) => {
                const px = (voxel.x - gridSize / 2) * 12;
                const py = (voxel.y - gridSize / 2) * 12;
                const pz = (voxel.z - gridSize / 2) * 12;
                return (
                  <motion.div key={`${voxel.x}-${voxel.y}-${voxel.z}`} className="absolute rounded-sm"
                    style={{ width: voxel.size, height: voxel.size, background: voxel.isContent ? '#22d3ee' : '#06b6d4', left: px, top: py, opacity: voxel.opacity * (isHovered ? 0.8 + sliceProgress * 0.2 : 1), boxShadow: voxel.isContent ? '0 0 3px #22d3ee' : 'none', transform: `translateZ(${pz}px)` }} />
                );
              })}
            </motion.div>
          </div>
          {isHovered && (
            <motion.div className="absolute pointer-events-none z-[3]" style={{ left: '12%', right: '12%', top: `${sliceProgress * 70 + 5}%`, height: 40, background: 'linear-gradient(180deg, rgba(6,182,212,0.12), transparent 60%)', borderTop: '1px solid rgba(6,182,212,0.18)', filter: 'blur(1px)' }} initial={{ opacity: 0 }} animate={{ opacity: 1 }} transition={{ duration: 0.3 }}>
              <div className="absolute -top-3 left-1/2 -translate-x-1/2 text-[6px] font-mono whitespace-nowrap" style={{ color: '#22d3ee' }}>═══ SLICE (Z) ═══</div>
            </motion.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)' }}>{datasetName}</p><p className="text-[9px]" style={{ color: 'rgba(6,182,212,0.44)' }}>32³ · Z-slice</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 }}>{isHovered ? 'SLICING' : 'IDLE'}</motion.div>
            </div>
            <div className="text-center"><span className="text-[7px] font-mono" style={{ color: 'rgba(6,182,212,0.2)' }}>{isHovered ? '[▼ click to rotate view]' : '[▼ hover to slice volume]'}</span></div>
          </div>
        </motion.div>
      </motion.div>
    </div>
  );
}

Where Volumetric Voxel Card fits

  • Data visualization
  • 3D volume rendering
  • Scientific dashboards
  • Medical imaging UI
  • Research interfaces

Interaction states & animations

  • Voxel floating
  • Slice plane scan
  • Volume rotation
  • Ambient idle spin
  • Density cluster pulse

Topics

  • #voxel
  • #volumetric
  • #3d
  • #hologram
  • #slice
  • #data
  • #scientific
  • #cyberpunk
  • #floating
  • #tech

Accessibility notes

The 3D volume rendering may be disorienting for users with vestibular disorders. Provide prefers-reduced-motion fallback to disable rotation and animations.

Browser support

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