StealThis .dev

Bokeh Particle Hero

Ambient glowing bokeh particle field with mouse-reactive parallax and depth-of-field blur.

Open in Lab
canvas-2dvanilla-js
Targets: JS HTML

Code

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #050608;
  --text: #f4f7fa;
  --muted: #b9c2ce;
  --accent: #86e8ff;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'SF Pro Display', system-ui, sans-serif;
  min-height: 100vh;
  overflow: hidden;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero {
  position: relative;
  z-index: 2;
  display: grid;
  place-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 2rem;
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 50%, #ae52ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  color: var(--muted);
  max-width: 480px;
  margin: 1rem auto 0;
  line-height: 1.6;
}

.cta-group {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  font: 600 0.85rem/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6ec1ff);
  color: #070a12;
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(134, 232, 255, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(134, 232, 255, 0.3);
  color: var(--accent);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(134, 232, 255, 0.08);
}

@media (max-width: 540px) {
  .cta-group { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 260px; text-align: center; }
}

Bokeh Particle Hero

Ambient glowing bokeh particle field with mouse-reactive parallax and depth-of-field blur.

Source

  • Repository: libs-genclaude
  • Original demo id: 15-bokeh-particles

Notes

Ambient glowing bokeh particle field with mouse-reactive parallax and depth-of-field blur.