Skip to content

Portal Card

Every card is actually a portal into another dimension. Features a rotating portal ring with energy distortion, space bending, and floating particles. The portal opens with increased energy on hover.

Portal Card

by FreeCsStyles Dev's

CardsPortal
🌐🎨⚛️💚🅰️🔥☁️
#portal#dimension#wormhole#portal-ring#energy#distortion#space#sci-fi#fantasy#vortex

Embed this component

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

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

Implementation code

Copy the HTML and CSS for Portal 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="portal-card">
  <div class="portal-glow-bg"></div>
  <div class="portal-frame">
    <div class="portal-rings">
      <div class="portal-ring-outer"></div>
      <div class="portal-ring-middle"></div>
      <div class="portal-ring-inner"></div>
      <div class="portal-vortex"></div>
    </div>
    <div class="portal-content">
      <div class="portal-header">
        <div class="portal-title">Dimensional Portal</div>
        <div class="portal-dest">→ Unknown Realm</div>
      </div>
      <div class="portal-stats">
        <div class="p-stat">
          <div class="p-stat-h"><span>ENERGY</span><span>78%</span></div>
          <div class="p-stat-track"><div class="p-stat-fill" style="width: 78%"></div></div>
        </div>
        <div class="p-stat">
          <div class="p-stat-h"><span>STABILITY</span><span>92%</span></div>
          <div class="p-stat-track"><div class="p-stat-fill" style="width: 92%"></div></div>
        </div>
      </div>
      <div class="portal-tags">
        <span class="p-tag">PORTAL</span>
        <span class="p-tag">VOID</span>
      </div>
    </div>
  </div>
</div>
CSS
.portal-card {
  position: relative;
  width: 210px;
}

.portal-glow-bg {
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  z-index: -1;
  background: radial-gradient(circle, rgba(168,85,247,0.05), transparent 70%);
  filter: blur(15px);
  transition: all 0.5s ease;
}

.portal-card:hover .portal-glow-bg {
  transform: scale(1.5);
  background: radial-gradient(circle, rgba(168,85,247,0.15), transparent 70%);
  filter: blur(30px);
}

.portal-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 300px;
  background: linear-gradient(145deg, #0a0a1a, #050510);
  border: 1px solid rgba(168,85,247,0.15);
  box-shadow: 0 0 15px rgba(168,85,247,0.05), 0 10px 30px rgba(0,0,0,0.4);
  transition: all 0.4s ease;
}

.portal-card:hover .portal-frame {
  border-color: rgba(168,85,247,0.4);
  box-shadow: 0 0 40px rgba(168,85,247,0.2), 0 20px 50px rgba(0,0,0,0.5);
}

.portal-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.portal-ring-outer {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 2px solid rgba(168,85,247,0.2);
  box-shadow: 0 0 20px rgba(168,85,247,0.1);
  animation: portal-pulse 3s ease-in-out infinite;
}

@keyframes portal-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.portal-ring-middle {
  position: absolute;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  border: 1.5px solid rgba(168,85,247,0.15);
  animation: portal-rotate 8s linear infinite;
}

@keyframes portal-rotate {
  to { transform: rotate(360deg); }
}

.portal-ring-inner {
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 1px solid rgba(168,85,247,0.3);
  background: radial-gradient(circle, rgba(168,85,247,0.08), transparent);
  animation: portal-breathe 3s ease-in-out infinite;
}

@keyframes portal-breathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(180deg); }
}

.portal-vortex {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: conic-gradient(from var(--angle, 0deg), #a78bfa, transparent, #a78bfa, transparent, #a78bfa);
  filter: blur(4px);
  animation: vortex-spin 3s linear infinite;
}

@keyframes vortex-spin {
  to { --angle: 360deg; }
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.portal-content {
  position: relative;
  z-index: 10;
  height: 100%;
  min-height: 300px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.portal-header {
  text-align: center;
}

.portal-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  color: rgba(255,255,255,0.9);
}

.portal-dest {
  font-size: 9px;
  color: rgba(168,85,247,0.5);
}

.portal-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p-stat {}

.p-stat-h {
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 2px;
}

.p-stat-h span:last-child {
  color: #a78bfa;
  font-weight: 700;
}

.p-stat-track {
  height: 4px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}

.p-stat-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(168,85,247,0.3), #a78bfa);
}

.portal-tags {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

.p-tag {
  height: 16px;
  padding: 0 8px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #a78bfa;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.2);
}

@media (prefers-reduced-motion: reduce) {
  .portal-ring-outer, .portal-ring-middle, .portal-ring-inner, .portal-vortex {
    animation: none !important;
  }
}
Tailwind CSS
<div class="group relative w-[210px]">
  <div class="absolute -inset-10 rounded-full -z-10 bg-purple-500/10 blur-xl scale-100 group-hover:scale-150 group-hover:bg-purple-500/20 group-hover:blur-2xl transition-all duration-500"></div>
  <div class="relative rounded-2xl overflow-hidden min-h-[300px] bg-gradient-to-br from-[#0a0a1a] to-[#050510] border border-purple-500/20 shadow-lg transition-all duration-500 group-hover:border-purple-500/50 group-hover:shadow-[0_0_40px_rgba(168,85,247,0.2),0_20px_50px_rgba(0,0,0,0.5)]">
    <div class="absolute inset-0 flex items-center justify-center pointer-events-none">
      <div class="relative">
        <div class="w-[130px] h-[130px] rounded-full border-2 border-purple-500/20 shadow-[0_0_20px_rgba(168,85,247,0.1)] group-hover:animate-pulse"></div>
        <div class="absolute inset-3 rounded-full border border-purple-500/15" style="animation: portalRotate 8s linear infinite;"></div>
        <div class="absolute inset-6 rounded-full border border-purple-500/30 bg-purple-500/10" style="animation: portalBreathe 3s ease-in-out infinite;"></div>
        <div class="absolute inset-8 rounded-full blur-sm" style="background: conic-gradient(from var(--angle, 0deg), #a78bfa, transparent, #a78bfa, transparent, #a78bfa); animation: vortexSpin 3s linear infinite;"></div>
      </div>
    </div>
    <div class="relative z-10 h-full min-h-[300px] p-5 flex flex-col justify-between">
      <div class="text-center">
        <div class="text-sm font-bold text-white/90 mb-0.5">Dimensional Portal</div>
        <div class="text-[9px] text-purple-500/50">→ Unknown Realm</div>
      </div>
      <div class="space-y-2">
        <div><div class="flex justify-between mb-0.5"><span class="text-[7px] text-white/35">ENERGY</span><span class="text-[7px] font-bold text-purple-400">78%</span></div><div class="h-1 rounded-full bg-white/5 overflow-hidden"><div class="h-full rounded-full bg-gradient-to-r from-purple-500/30 to-purple-400" style="width: 78%"></div></div></div>
        <div><div class="flex justify-between mb-0.5"><span class="text-[7px] text-white/35">STABILITY</span><span class="text-[7px] font-bold text-purple-400">92%</span></div><div class="h-1 rounded-full bg-white/5 overflow-hidden"><div class="h-full rounded-full bg-gradient-to-r from-purple-500/30 to-purple-400" style="width: 92%"></div></div></div>
        <div class="flex gap-2 pt-1">
          <span class="h-4 px-2 rounded flex items-center text-[7px] font-bold tracking-widest text-purple-400 bg-purple-500/10 border border-purple-500/20">PORTAL</span>
          <span class="h-4 px-2 rounded flex items-center text-[7px] font-bold tracking-widest text-purple-400 bg-purple-500/10 border border-purple-500/20">VOID</span>
        </div>
      </div>
    </div>
  </div>
  <style>{`@keyframes portalRotate { to { transform: rotate(360deg); } } @keyframes portalBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } } @property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; } @keyframes vortexSpin { to { --angle: 360deg; } }`}</style>
</div>
React
import React, { useState } from 'react';
import { motion } from 'framer-motion';

export function PortalCard() {
  const [isHovered, setIsHovered] = useState(false);
  const ringParticles = 20;

  return (
    <div onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)}>
      <motion.div className="absolute -inset-10 rounded-full -z-10 pointer-events-none"
        animate={{
          background: isHovered ? 'radial-gradient(circle, rgba(168,85,247,0.15), transparent 70%)' : 'radial-gradient(circle, rgba(168,85,247,0.05), transparent 70%)',
          filter: isHovered ? 'blur(30px)' : 'blur(15px)',
          scale: isHovered ? 1.5 : 1,
        }}
        transition={{ duration: 0.5 }} />
      <div className="relative overflow-hidden rounded-2xl" style={{
        width: 210, minHeight: 300,
        background: 'linear-gradient(145deg, #0a0a1a, #050510)',
        border: `1px solid rgba(168,85,247,${isHovered ? 0.4 : 0.15})`,
        boxShadow: isHovered ? '0 0 40px rgba(168,85,247,0.2), 0 20px 50px rgba(0,0,0,0.5)' : '0 0 15px rgba(168,85,247,0.05), 0 10px 30px rgba(0,0,0,0.4)',
      }}>
        <div className="absolute inset-0 flex items-center justify-center pointer-events-none">
          <motion.div className="relative"
            animate={{ scale: isHovered ? [1, 1.08, 1] : 1, rotate: isHovered ? [0, 5, -5, 0] : 0 }}
            transition={{ scale: { duration: 2, repeat: isHovered ? Infinity : 0 }, rotate: { duration: 3, repeat: isHovered ? Infinity : 0 } }}>
            <div className="rounded-full" style={{ width: 130, height: 130, border: '2px solid rgba(168,85,247,0.2)' }} />
            <motion.div className="absolute inset-3 rounded-full" style={{ border: '1.5px solid rgba(168,85,247,0.15)' }} animate={{ rotate: isHovered ? 360 : 0 }} transition={{ duration: 8, repeat: Infinity, ease: 'linear' }} />
            <motion.div className="absolute inset-6 rounded-full" style={{ border: '1px solid rgba(168,85,247,0.3)', background: 'radial-gradient(circle, rgba(168,85,247,0.08), transparent)' }}
              animate={{ scale: isHovered ? [1, 1.15, 1] : 1 }} transition={{ duration: 3, repeat: Infinity, ease: 'easeInOut' }} />
          </motion.div>
        </div>
        <div className="relative z-10 h-full min-h-[300px] p-5 flex flex-col justify-between">
          <div className="text-center">
            <p className="text-sm font-bold text-white/90 mb-0.5">Dimensional Portal</p>
            <p className="text-[9px] text-purple-500/50">→ Unknown Realm</p>
          </div>
          <div className="space-y-2">
            {[{ label: 'ENERGY', val: 78 }, { label: 'STABILITY', val: 92 }].map((s) => (
              <div key={s.label} className="space-y-0.5">
                <div className="flex justify-between"><span className="text-[7px] text-white/35">{s.label}</span><span className="text-[7px] font-bold text-purple-400">{s.val}%</span></div>
                <div className="h-1 rounded-full bg-white/5 overflow-hidden"><div className="h-full rounded-full bg-gradient-to-r from-purple-500/30 to-purple-400" style={{ width: s.val + '%' }} /></div>
              </div>
            ))}
            <div className="flex gap-2 pt-1">
              <span className="text-[7px] px-2 py-0.5 font-bold tracking-widest text-purple-400 bg-purple-500/10 border border-purple-500/20" style={{ borderRadius: 2 }}>PORTAL</span>
              <span className="text-[7px] px-2 py-0.5 font-bold tracking-widest text-purple-400 bg-purple-500/10 border border-purple-500/20" style={{ borderRadius: 2 }}>VOID</span>
            </div>
          </div>
        </div>
      </div>
    </div>
  );
}

Where Portal Card fits

  • Portfolio
  • Gaming
  • AI
  • Sci-Fi
  • Fantasy
  • Creative Landing Pages

Interaction states & animations

  • Wormhole
  • Particle tunnel
  • Motion blur
  • Energy rings
  • Light streaks

Topics

  • #portal
  • #dimension
  • #wormhole
  • #portal-ring
  • #energy
  • #distortion
  • #space
  • #sci-fi
  • #fantasy
  • #vortex

Accessibility notes

The portal animation may be disorienting for some users. Provide prefers-reduced-motion support that simplifies to a static ring. Ensure text is readable with high contrast.

Browser support

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