Skip to content

Tiny World Card

A living miniature world exists inside every card. Features animated clouds, rain, cars, birds, and buildings. The tiny diorama responds to hover with weather effects and moving characters.

Tiny World Card

by FreeCsStyles Dev's

CardsTiny World
🌐🎨⚛️💚🅰️🔥☁️
#tiny-world#diorama#miniature#weather#animated#scene#living#interactive#playful#whimsical

Embed this component

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

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

Implementation code

Copy the HTML and CSS for Tiny World 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="tiny-world-card">
  <div class="tw-sky"></div>
  <div class="tw-cloud" style="top: 8%; left: 10%;">
    <svg width="36" height="16" viewBox="0 0 36 16" fill="white" opacity="0.6">
      <ellipse cx="12" cy="10" rx="10" ry="6"/>
      <ellipse cx="22" cy="8" rx="10" ry="7"/>
      <ellipse cx="18" cy="7" rx="8" ry="5"/>
    </svg>
  </div>
  <div class="tw-cloud" style="top: 12%; left: 45%;">
    <svg width="28" height="12" viewBox="0 0 36 16" fill="white" opacity="0.5">
      <ellipse cx="12" cy="10" rx="10" ry="6"/>
      <ellipse cx="22" cy="8" rx="10" ry="7"/>
      <ellipse cx="18" cy="7" rx="8" ry="5"/>
    </svg>
  </div>
  <div class="tw-ground"></div>
  <div class="tw-hills"></div>
  <div class="tw-buildings">
    <div class="tw-building" style="height: 20px;"></div>
    <div class="tw-building" style="height: 28px;"></div>
    <div class="tw-building" style="height: 16px;"></div>
    <div class="tw-building" style="height: 32px;"></div>
    <div class="tw-building" style="height: 14px;"></div>
  </div>
  <div class="tw-car">
    <svg width="18" height="10" viewBox="0 0 18 10" fill="rgba(255,200,100,0.7)">
      <rect x="2" y="3" width="14" height="5" rx="2"/>
      <rect x="4" y="1" width="10" height="3" rx="1" fill="rgba(255,220,150,0.5)"/>
      <circle cx="5" cy="8" r="1.5" fill="rgba(0,0,0,0.4)"/>
      <circle cx="13" cy="8" r="1.5" fill="rgba(0,0,0,0.4)"/>
    </svg>
  </div>
  <div class="tw-info">
    <div class="tw-header">
      <div>
        <div class="tw-title">Weather Valley</div>
        <div class="tw-sub">Northern Town</div>
      </div>
      <div class="tw-temp">18°C</div>
    </div>
    <div class="tw-details">
      <span>Cloudy</span>
      <span>Wind: 12 km/h</span>
    </div>
  </div>
</div>
CSS
.tiny-world-card {
  position: relative;
  width: 210px;
  height: 300px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  border: 2px solid rgba(255,255,255,0.08);
  transition: all 0.4s ease;
}

.tiny-world-card:hover {
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.tw-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #4a90d9 0%, #87ceeb 50%, #b8d4e8 100%);
}

.tw-cloud {
  position: absolute;
  pointer-events: none;
  animation: cloud-drift 6s ease-in-out infinite;
}

.tw-cloud:nth-child(2) { animation-delay: 1.5s; animation-duration: 8s; }
.tw-cloud:nth-child(3) { animation-delay: 0.8s; animation-duration: 5s; }

@keyframes cloud-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(30px); }
}

.tw-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(0deg, #4a7a40, #6a9a50);
}

.tw-hills {
  position: absolute;
  bottom: 35%;
  left: 0;
  right: 0;
  height: 32px;
  background: rgba(255,255,255,0.05);
  border-radius: 50% 50% 0 0;
}

.tw-buildings {
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  align-items: flex-end;
}

.tw-building {
  width: 10px;
  border-radius: 2px 2px 0 0;
  background: rgba(255,255,255,0.15);
  border-top: 1px solid rgba(255,255,255,0.2);
}

.tw-building:nth-child(1) { height: 20px; }
.tw-building:nth-child(2) { height: 28px; }
.tw-building:nth-child(3) { height: 16px; }
.tw-building:nth-child(4) { height: 32px; }
.tw-building:nth-child(5) { height: 14px; }

.tw-car {
  position: absolute;
  bottom: 32%;
  pointer-events: none;
  animation: car-drive 5s linear infinite;
}

@keyframes car-drive {
  from { left: -20px; }
  to { left: 230px; }
}

.tw-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 16px;
}

.tw-info > div {
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 12px;
}

.tw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.tw-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

.tw-sub {
  font-size: 8px;
  color: rgba(255,255,255,0.5);
}

.tw-temp {
  font-size: 18px;
  font-weight: 200;
  color: rgba(255,255,255,0.9);
}

.tw-details {
  display: flex;
  gap: 12px;
  font-size: 8px;
  color: rgba(255,255,255,0.5);
}

@media (prefers-reduced-motion: reduce) {
  .tw-cloud { animation: none; }
  .tw-car { animation: none; display: none; }
}
Tailwind CSS
<div class="group relative w-[210px] h-[300px] rounded-2xl overflow-hidden border-2 border-white/10 shadow-lg group-hover:shadow-[0_25px_50px_rgba(0,0,0,0.5)] transition-shadow duration-500">
  <div class="absolute inset-0 bg-gradient-to-b from-blue-500 via-sky-300 to-blue-200"></div>
  <div class="absolute pointer-events-none" style="top: 8%; left: 10%; animation: cloudDrift 6s ease-in-out infinite;">
    <svg width="36" height="16" viewBox="0 0 36 16" fill="white" opacity="0.6">
      <ellipse cx="12" cy="10" rx="10" ry="6"/><ellipse cx="22" cy="8" rx="10" ry="7"/><ellipse cx="18" cy="7" rx="8" ry="5"/>
    </svg>
  </div>
  <div class="absolute bottom-0 left-0 right-0 h-2/5 bg-gradient-to-t from-green-600 to-green-500"></div>
  <div class="absolute bottom-[35%] left-0 right-0 h-8 bg-white/5 rounded-[50%_50%_0_0]"></div>
  <div class="absolute bottom-[30%] left-1/2 -translate-x-1/2 flex items-end gap-1">
    <div class="w-2.5 rounded-t-sm bg-white/15 border-t border-white/20" style="height: 20px"></div>
    <div class="w-2.5 rounded-t-sm bg-white/15 border-t border-white/20" style="height: 28px"></div>
    <div class="w-2.5 rounded-t-sm bg-white/15 border-t border-white/20" style="height: 16px"></div>
    <div class="w-2.5 rounded-t-sm bg-white/15 border-t border-white/20" style="height: 32px"></div>
    <div class="w-2.5 rounded-t-sm bg-white/15 border-t border-white/20" style="height: 14px"></div>
  </div>
  <div class="absolute bottom-[32%] pointer-events-none" style="animation: carDrive 5s linear infinite;">
    <svg width="18" height="10" viewBox="0 0 18 10" fill="rgba(255,200,100,0.7)">
      <rect x="2" y="3" width="14" height="5" rx="2"/>
      <rect x="4" y="1" width="10" height="3" rx="1" fill="rgba(255,220,150,0.5)"/>
      <circle cx="5" cy="8" r="1.5" fill="rgba(0,0,0,0.4)"/>
      <circle cx="13" cy="8" r="1.5" fill="rgba(0,0,0,0.4)"/>
    </svg>
  </div>
  <div class="absolute inset-x-0 bottom-0 z-10 p-4">
    <div class="rounded-xl backdrop-blur-sm bg-black/30 border border-white/10 p-3">
      <div class="flex items-center justify-between mb-1">
        <div>
          <div class="text-xs font-bold text-white/90">Weather Valley</div>
          <div class="text-[8px] text-white/50">Northern Town</div>
        </div>
        <div class="text-lg font-extralight text-white/90">18°C</div>
      </div>
      <div class="flex gap-3 text-[8px] text-white/50">
        <span>Cloudy</span>
        <span>Wind: 12 km/h</span>
      </div>
    </div>
  </div>
  <style>{`@keyframes cloudDrift { 0%,100% { transform: translateX(0); } 50% { transform: translateX(30px); } } @keyframes carDrive { from { left: -20px; } to { left: 230px; } }`}</style>
</div>
React
import React, { useState } from 'react';
import { motion } from 'framer-motion';

export function TinyWorldCard() {
  const [isHovered, setIsHovered] = useState(false);

  const clouds = [
    { x: '10%', y: '8%', scale: 1, delay: 0 },
    { x: '45%', y: '12%', scale: 0.7, delay: 1.5 },
    { x: '75%', y: '6%', scale: 0.85, delay: 0.8 },
  ];

  return (
    <div onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)}>
      <div className="relative overflow-hidden rounded-2xl"
        style={{ width: 210, height: 300, border: '2px solid rgba(255,255,255,0.08)', boxShadow: isHovered ? '0 25px 50px rgba(0,0,0,0.5)' : '0 10px 30px rgba(0,0,0,0.35)' }}>
        <div className="absolute inset-0" style={{ background: 'linear-gradient(180deg, #4a90d9 0%, #87ceeb 50%, #b8d4e8 100%)' }} />
        {clouds.map((cloud, i) => (
          <motion.div key={i} className="absolute pointer-events-none" style={{ top: cloud.y, left: cloud.x }}
            animate={{ x: isHovered ? [0, 30, 0] : [0, 15, 0] }}
            transition={{ duration: 6 + i * 2, repeat: Infinity, ease: 'easeInOut', delay: cloud.delay }}>
            <svg width="36" height="16" viewBox="0 0 36 16" fill="white" opacity={0.6}>
              <ellipse cx="12" cy="10" rx="10" ry="6" /><ellipse cx="22" cy="8" rx="10" ry="7" /><ellipse cx="18" cy="7" rx="8" ry="5" />
            </svg>
          </motion.div>
        ))}
        <div className="absolute bottom-0 left-0 right-0" style={{ height: '40%', background: 'linear-gradient(0deg, #4a7a40, #6a9a50)' }} />
        <div className="absolute bottom-[35%] left-0 right-0 h-8" style={{ background: 'rgba(255,255,255,0.05)', borderRadius: '50% 50% 0 0' }} />
        <div className="absolute bottom-[30%] left-1/2 -translate-x-1/2 flex items-end gap-1">
          {[20, 28, 16, 32, 14, 24].map((h, i) => (
            <motion.div key={i} className="rounded-t-sm" style={{ width: 10, height: h, background: `rgba(255,255,255,${0.15 + i * 0.03})`, borderTop: '1px solid rgba(255,255,255,0.2)' }}
              animate={isHovered ? { y: [0, -2, 0] } : {}} transition={{ duration: 2, repeat: isHovered ? Infinity : 0, delay: i * 0.1, ease: 'easeInOut' }} />
          ))}
        </div>
        <motion.div className="absolute bottom-[32%] pointer-events-none"
          animate={{ x: isHovered ? [-30, 240] : [-20, 220] }}
          transition={{ duration: isHovered ? 3 : 5, repeat: Infinity, ease: 'linear' }}>
          <svg width="18" height="10" viewBox="0 0 18 10" fill="rgba(255,200,100,0.7)">
            <rect x="2" y="3" width="14" height="5" rx="2" /><rect x="4" y="1" width="10" height="3" rx="1" fill="rgba(255,220,150,0.5)" />
            <circle cx="5" cy="8" r="1.5" fill="rgba(0,0,0,0.4)" /><circle cx="13" cy="8" r="1.5" fill="rgba(0,0,0,0.4)" />
          </svg>
        </motion.div>
        <div className="absolute inset-x-0 bottom-0 z-10 p-4">
          <div className="rounded-xl backdrop-blur-sm p-3" style={{ background: 'rgba(0,0,0,0.3)', border: '1px solid rgba(255,255,255,0.1)' }}>
            <div className="flex items-center justify-between mb-1">
              <div>
                <p className="text-xs font-bold text-white/90">Weather Valley</p>
                <p className="text-[8px] text-white/50">Northern Town</p>
              </div>
              <p className="text-lg font-extralight text-white/90">18°C</p>
            </div>
            <div className="flex gap-3 text-[8px] text-white/50"><span>Cloudy</span><span>Wind: 12 km/h</span></div>
          </div>
        </div>
      </div>
    </div>
  );
}

Where Tiny World Card fits

  • Weather Apps
  • Travel
  • Kids Apps
  • Interactive Dashboards
  • Creative Portfolios
  • Gaming

Interaction states & animations

  • Cloud movement
  • Rain fall
  • Car drive
  • Bird fly
  • Building bounce

Topics

  • #tiny-world
  • #diorama
  • #miniature
  • #weather
  • #animated
  • #scene
  • #living
  • #interactive
  • #playful
  • #whimsical

Accessibility notes

Ensure text contrast on transparent overlay backgrounds. Moving elements should respect prefers-reduced-motion. Provide fallback static scene for users with motion sensitivity.

Browser support

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