32 CSS Search Box & Search Bar Designs

Aurora Drift

A soft aurora-style gradient blob drifts gently behind the input on a slow, subtle loop — the premium-feel signal without spinning chrome aberration.

Pure CSS MIT licensed

Aurora Drift the 32nd of 32 designs in the 32 CSS Search Box & Search Bar Designs collection. The design is implemented in pure CSS — no JavaScript required. Copy the HTML and CSS panels below into your project. Because the demo is pure CSS, it works in any framework or templating engine you happen to use. The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.

Live preview

Open in playground

The code

<form class="csb-aurora" role="search">
  <label class="csb-sr" for="csb-aurora-i">Search</label>
  <input id="csb-aurora-i" type="search" name="q" placeholder="Search premium..." />
</form>
.csb-aurora {
  position: relative; display: inline-block;
  padding: 4px;
  border-radius: 14px;
  background: #15151d;
  overflow: hidden;
  isolation: isolate;
}
.csb-aurora::before {
  content: ''; position: absolute;
  top: -40%; left: -20%;
  width: 140%; height: 220%;
  background:
    radial-gradient(ellipse 240px 120px at 20% 50%, rgba(124,108,255,0.55), transparent 60%),
    radial-gradient(ellipse 200px 100px at 60% 50%, rgba(255,108,138,0.45), transparent 60%),
    radial-gradient(ellipse 220px 120px at 100% 50%, rgba(46,204,138,0.35), transparent 60%);
  filter: blur(18px);
  z-index: -1;
  animation: csb-aurora-drift 14s ease-in-out infinite;
  opacity: 0.85;
}
.csb-aurora input {
  display: block;
  width: 240px; padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.06);
  outline: none;
  background: rgba(21,21,29,0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 10px;
  color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
  transition: border-color 0.25s;
}
.csb-aurora:focus-within input { border-color: rgba(167,139,250,0.5); }
.csb-aurora input::placeholder { color: #b8b6d4; }
@keyframes csb-aurora-drift {
  0%, 100% { transform: translateX(0)    translateY(0); }
  50%       { transform: translateX(-8%) translateY(2%); }
}

.csb-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .csb-aurora,
  .csb-aurora * {
    animation: none !important;
  }
}

Search CodeFronts

Loading…