Skip to content

Isometric Room Card

A card that is an isometric diorama of a small room. Content is placed on different surfaces—walls, floor, table, shelves. Hover orbits the view slightly, peeking around corners. Clicking a room element rotates the entire room to focus on that surface. Tiny, delightful details like a plant or lamp make the space feel lived-in.

Isometric Room Card

by FreeCsStyles Dev's

Cards3D Perspective
🌐🎨⚛️💚🅰️🔥☁️
#isometric#room#diorama#3d#interior#cozy#orbit#perspective#elements

Embed this component

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

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

Implementation code

Copy the HTML and CSS for Isometric Room 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="isometric-room-card">
  <div class="room-interior">
    <div class="room-back-wall">
      <div class="room-window"></div>
    </div>
    <div class="room-floor">
      <div class="floor-line"></div>
      <div class="floor-line"></div>
      <div class="floor-line"></div>
    </div>
  </div>
  <div class="room-elements">
    <div class="room-element" data-id="0">📚</div>
    <div class="room-element" data-id="1">🪑</div>
    <div class="room-element" data-id="2">🪔</div>
    <div class="room-element" data-id="3">🌿</div>
    <div class="room-element" data-id="4">🪟</div>
  </div>
  <div class="room-light-glow"></div>
  <div class="room-content">
    <div class="room-header">
      <div><div class="room-title">Cozy Study</div><div class="room-sub">Warm & Inviting</div></div>
      <div class="room-badge">EXPLORE</div>
    </div>
    <div class="room-grid">
      <div class="room-stat"><div class="room-stat-val">5 items</div><div class="room-stat-lbl">Elements</div></div>
      <div class="room-stat"><div class="room-stat-val">👁️</div><div class="room-stat-lbl">Orbit</div></div>
    </div>
    <div class="room-hint">[▼ click an item to focus]</div>
  </div>
</div>
CSS
.isometric-room-card { position: relative; width: 220px; min-height: 300px; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #1a1410, #0e0a08); border: 1.5px solid rgba(232,168,124,0.15); box-shadow: 0 10px 30px rgba(0,0,0,0.3); cursor: default; }
.isometric-room-card:hover { box-shadow: 0 0 30px rgba(232,168,124,0.08), 0 15px 40px rgba(0,0,0,0.4); }
.room-interior { position: absolute; inset: 0; z-index: 2; transform-style: preserve-3d; }
.room-back-wall { position: absolute; left: 10%; right: 10%; top: 15%; height: 45%; background: linear-gradient(180deg, #2a1f1a, #2a1f1acc); border: 1px solid rgba(232,168,124,0.15); border-radius: 4px 4px 0 0; }
.room-window { position: absolute; top: 20%; left: 50%; transform: translateX(-50%); width: 40%; height: 55%; border: 1px solid rgba(232,168,124,0.15); border-radius: 2px; background: linear-gradient(135deg, rgba(244,212,160,0.03), transparent); }
.room-floor { position: absolute; left: 5%; right: 5%; bottom: 8%; height: 35%; background: linear-gradient(0deg, #3a2a20, #3a2a2088); border: 1px solid rgba(232,168,124,0.15); border-radius: 0 0 4px 4px; }
.floor-line { position: absolute; left: 15%; right: 15%; height: 1px; background: linear-gradient(90deg, transparent, rgba(232,168,124,0.15), transparent); opacity: 0.3; }
.floor-line:nth-child(1) { bottom: 22%; } .floor-line:nth-child(2) { bottom: 33%; } .floor-line:nth-child(3) { bottom: 44%; }
.room-elements { position: absolute; inset: 0; z-index: 4; }
.room-element { position: absolute; cursor: pointer; transform: translate(-50%,-50%); transition: all 0.3s ease; }
.room-element:hover { transform: translate(-50%,-50%) scale(1.15); }
.room-element[data-id="0"] { left: 50%; top: 28%; font-size: 14px; }
.room-element[data-id="1"] { left: 50%; top: 58%; font-size: 14px; }
.room-element[data-id="2"] { left: 30%; top: 42%; font-size: 14px; }
.room-element[data-id="3"] { left: 72%; top: 52%; font-size: 14px; }
.room-element[data-id="4"] { left: 50%; top: 20%; font-size: 14px; }
.room-light-glow { position: absolute; top: 22%; left: 28%; width: 40px; height: 48px; border-radius: 50%; pointer-events: none; z-index: 3; background: radial-gradient(ellipse, rgba(244,212,160,0.08), transparent 70%); filter: blur(6px); transition: all 0.5s; opacity: 0.4; }
.isometric-room-card:hover .room-light-glow { opacity: 0.8; transform: scale(1.2); }
.room-content { position: absolute; inset-x: 0; bottom: 0; z-index: 10; padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent); }
.room-header { display: flex; justify-content: space-between; align-items: center; }
.room-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); }
.room-sub { font-size: 9px; color: rgba(232,168,124,0.44); }
.room-badge { padding: 2px 8px; border-radius: 2px; font-size: 7px; font-weight: 700; letter-spacing: 0.1em; color: #e8a87c; background: rgba(232,168,124,0.06); border: 1px solid rgba(232,168,124,0.12); }
.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.room-stat { text-align: center; padding: 6px 4px; border-radius: 8px; background: rgba(232,168,124,0.04); border: 1px solid rgba(232,168,124,0.06); }
.room-stat-val { font-size: 10px; font-weight: 600; color: #e8a87c; }
.room-stat-lbl { font-size: 7px; margin-top: 2px; color: rgba(255,255,255,0.2); }
.room-hint { text-align: center; margin-top: 8px; font-size: 7px; font-family: monospace; color: rgba(232,168,124,0.18); }
@media (prefers-reduced-motion: reduce) { .room-light-glow { opacity: 0.4; } }
Tailwind CSS
<div class="group relative w-[220px] min-h-[300px] rounded-2xl overflow-hidden border border-orange-300/20 shadow-lg group-hover:shadow-[0_0_30px_rgba(232,168,124,0.08),0_15px_40px_rgba(0,0,0,0.4)] bg-gradient-to-b from-[#1a1410] to-[#0e0a08]">
  <div class="absolute left-[10%] right-[10%] top-[15%] h-[45%] bg-gradient-to-b from-[#2a1f1a] to-[#2a1f1acc] border border-orange-300/20 rounded-t">
    <div class="absolute top-[20%] left-1/2 -translate-x-1/2 w-[40%] h-[55%] border border-orange-300/20 rounded bg-gradient-to-br from-amber-100/10 to-transparent"></div>
  </div>
  <div class="absolute left-[5%] right-[5%] bottom-[8%] h-[35%] bg-gradient-to-t from-[#3a2a20] to-[#3a2a2088] border border-orange-300/20 rounded-b"></div>
  <div class="absolute top-[28%] left-1/2 -translate-x-1/2 -translate-y-1/2 z-[4] cursor-pointer text-base hover:scale-110 transition-transform">📚</div>
  <div class="absolute top-[58%] left-1/2 -translate-x-1/2 -translate-y-1/2 z-[4] cursor-pointer text-base hover:scale-110 transition-transform">🪑</div>
  <div class="absolute top-[42%] left-[30%] -translate-x-1/2 -translate-y-1/2 z-[4] cursor-pointer text-base hover:scale-110 transition-transform">🪔</div>
  <div class="absolute top-[52%] left-[72%] -translate-x-1/2 -translate-y-1/2 z-[4] cursor-pointer text-base hover:scale-110 transition-transform">🌿</div>
  <div class="absolute top-[20%] left-1/2 -translate-x-1/2 -translate-y-1/2 z-[4] cursor-pointer text-base hover:scale-110 transition-transform">🪟</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">Cozy Study</p><p class="text-[9px] text-orange-300/50">Warm & Inviting</p></div>
      <div class="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest text-orange-300 bg-orange-500/10 border border-orange-500/20">EXPLORE</div>
    </div>
    <div class="h-px bg-gradient-to-r from-transparent via-orange-300/10 to-transparent"></div>
    <div class="grid grid-cols-2 gap-2">
      <div class="text-center py-1.5 rounded-lg bg-orange-500/10 border border-orange-500/20"><p class="text-[10px] font-semibold text-orange-300">5 items</p><p class="text-[7px] mt-0.5 text-white/20">Elements</p></div>
      <div class="text-center py-1.5 rounded-lg bg-orange-500/10 border border-orange-500/20"><p class="text-[10px] font-semibold text-orange-300">👁️</p><p class="text-[7px] mt-0.5 text-white/20">Orbit</p></div>
    </div>
    <div class="text-center"><span class="text-[7px] font-mono text-orange-300/30">[▼ click an item to focus]</span></div>
  </div>
</div>
React
import React, { useState, useRef, useCallback } from 'react';
import { motion, useMotionValue, useSpring } from 'framer-motion';

export function IsometricRoomCard({ roomName = 'Cozy Study', mood = 'Warm & Inviting', width = 220 }) {
  const [isHovered, setIsHovered] = useState(false);
  const [focusedElement, setFocusedElement] = useState(null);
  const ref = useRef(null);
  const x = useMotionValue(0);
  const y = useMotionValue(0);
  const rotateX = useSpring(y, { damping: 20, stiffness: 180 });
  const rotateY = useSpring(x, { damping: 20, stiffness: 180 });
  const elements = [
    { id: 0, name: 'Bookshelf', x: 50, y: 28, emoji: '📚' },
    { id: 1, name: 'Desk', x: 50, y: 58, emoji: '🪑' },
    { id: 2, name: 'Lamp', x: 30, y: 42, emoji: '🪔' },
    { id: 3, name: 'Plant', x: 72, y: 52, emoji: '🌿' },
    { id: 4, name: 'Window', x: 50, y: 20, emoji: '🪟' },
  ];
  const handleMouseMove = (e) => {
    if (!ref.current || focusedElement !== null) return;
    const rect = ref.current.getBoundingClientRect();
    x.set(-((e.clientX - rect.left - rect.width / 2) / (rect.width / 2)) * 8);
    y.set(((e.clientY - rect.top - rect.height / 2) / (rect.height / 2)) * 8);
  };
  const handleElementClick = (id) => {
    if (focusedElement === id) { setFocusedElement(null); x.set(0); y.set(0); }
    else { setFocusedElement(id); const offsets = { 0: -6, 1: 4, 2: -10, 3: 8, 4: 0 }; x.set(offsets[id] || 0); }
  };
  return (
    <div onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => { setIsHovered(false); if (focusedElement === null) { x.set(0); y.set(0); } }}>
      <motion.div ref={ref} onMouseMove={handleMouseMove} style={{ rotateX, rotateY, transformStyle: 'preserve-3d' }} className="relative">
        <motion.div className="relative overflow-hidden rounded-2xl" style={{ width, minHeight: 300, background: 'linear-gradient(160deg, #1a1410, #0e0a08)', border: '1.5px solid rgba(232,168,124,0.15)' }}
          animate={{ boxShadow: isHovered ? '0 0 30px rgba(232,168,124,0.08), 0 15px 40px rgba(0,0,0,0.4)' : '0 10px 30px rgba(0,0,0,0.3)' }} transition={{ type: 'spring', stiffness: 260, damping: 20 }}>
          <div className="absolute left-[10%] right-[10%] top-[15%] h-[45%]" style={{ background: 'linear-gradient(180deg, #2a1f1a, #2a1f1acc)', border: '1px solid rgba(232,168,124,0.15)', borderRadius: '4px 4px 0 0' }}>
            <div className="absolute top-[20%] left-1/2 -translate-x-1/2" style={{ width: '40%', height: '55%', border: '1px solid rgba(232,168,124,0.15)', borderRadius: '2px', background: 'linear-gradient(135deg, rgba(244,212,160,0.03), transparent)' }} />
          </div>
          <div className="absolute left-[5%] right-[5%] bottom-[8%] h-[35%]" style={{ background: 'linear-gradient(0deg, #3a2a20, #3a2a2088)', border: '1px solid rgba(232,168,124,0.15)', borderRadius: '0 0 4px 4px' }} />
          <div className="absolute top-[22%] left-[28%] w-10 h-12 rounded-full pointer-events-none z-[3]" style={{ background: 'radial-gradient(ellipse, rgba(244,212,160,0.08), transparent 70%)', filter: 'blur(6px)' }}
            animate={{ scale: isHovered ? [1, 1.2, 1] : 1, opacity: isHovered ? 0.8 : 0.4 }} transition={{ duration: 3, repeat: isHovered ? Infinity : 0, ease: 'easeInOut' }} />
          {elements.map((el) => (
            <motion.div key={el.id} className="absolute cursor-pointer" style={{ left: el.x + '%', top: el.y + '%', transform: 'translate(-50%,-50%)' }}
              onClick={(e) => { e.stopPropagation(); handleElementClick(el.id); }}
              animate={{ scale: focusedElement === el.id ? 1.3 : isHovered ? 1.1 : 1, y: focusedElement === el.id ? -4 : 0 }}
              transition={{ type: 'spring', stiffness: 300, damping: 15 }}>
              <span className="text-base">{el.emoji}</span>
              {focusedElement === el.id && <motion.span className="text-[6px] font-bold mt-0.5 block text-center" style={{ color: '#e8a87c' }} initial={{ opacity: 0 }} animate={{ opacity: 1 }}>{el.name}</motion.span>}
            </motion.div>
          ))}
          <div className="absolute inset-0 z-[5] pointer-events-none" style={{ boxShadow: 'inset 0 0 30px rgba(0,0,0,0.3)' }} />
          <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)' }}>{roomName}</p><p className="text-[9px]" style={{ color: 'rgba(232,168,124,0.44)' }}>{mood}</p></div>
              <div className="px-2 py-0.5 rounded-sm text-[7px] font-bold tracking-widest" style={{ background: 'rgba(232,168,124,0.06)', border: '1px solid rgba(232,168,124,0.12)', color: '#e8a87c' }}>{focusedElement !== null ? 'FOCUS' : 'EXPLORE'}</div>
            </div>
            <div className="text-center"><span className="text-[7px] font-mono" style={{ color: 'rgba(232,168,124,0.18)' }}>{focusedElement !== null ? '[▼ click to return]' : '[▼ click an item to focus]'}</span></div>
          </div>
        </motion.div>
      </motion.div>
    </div>
  );
}

Where Isometric Room Card fits

  • Virtual room tours
  • Interior design previews
  • 3D menus
  • Game inventory screens
  • Ambient storytelling

Interaction states & animations

  • Room orbit
  • Element focus
  • Gentle float
  • Warm light pulse
  • Smooth zoom

Topics

  • #isometric
  • #room
  • #diorama
  • #3d
  • #interior
  • #cozy
  • #orbit
  • #perspective
  • #elements

Accessibility notes

The 3D orbit effect may cause motion sensitivity. Ensure clickable room elements are clearly indicated. Provide prefers-reduced-motion fallback that disables all rotation.

Browser support

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