Back to the library

Starburst order confirm

Variant: Standard

A confirmation card for a placed order or a completed checkout. The badge settles in and the check draws itself. Then a ring of alternating long and short rays fires outward once and clears, followed by the label. Each ray grows in 128ms and pulls its tail out in 160ms, and the short rays fire 40ms after the long ones. The burst reads as one sharp flash, never as a spin.

confirmationsuccessstarburstfeedbackcheckout

The source

A complete HTML document. Paste it into an empty .html file and it plays — no stylesheet, script, font, or image to fetch.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Starburst order confirm — Standard</title>
<style>
:root {
  /* Neutrals — fixed, never remixed. */
  --ivory: #faf9f5;
  --paper: #ffffff;
  --oat: #e3dacc;
  --slate: #141413;

  /* Knobs — the remix API. A knob exists iff declared here and used below. */
  --hue: 38.8;
  --lift: 0;
  --chroma: 1;
  --round: 1; /* include ONLY if at least one border-radius is wrapped below */
  --speed: 1;

  /* Accents — derived from the knobs with the family's offsets baked in,
     so one hue roll moves them together. Defaults reproduce the original hex
     (#d97757 / #b85c3e / #788c5d / #b04a3f). */
  --clay: oklch(calc(0.6724 + var(--lift)) calc(0.1308 * var(--chroma)) var(--hue));
  --clay-d: oklch(calc(0.5797 + var(--lift)) calc(0.127 * var(--chroma)) var(--hue));
  --olive: oklch(calc(0.6118 + var(--lift)) calc(0.0713 * var(--chroma)) calc(var(--hue) + 88.3));
  --rust: oklch(calc(0.5408 + var(--lift)) calc(0.1357 * var(--chroma)) calc(var(--hue) - 10.3));

  /* Clock — every duration in the document runs off --t. */
  --cycle: 3.2s; /* the authored master loop */
  --t: calc(var(--cycle) / var(--speed));

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* include only if used */

  --_teal: oklch(calc(0.7 + var(--lift)) calc(0.105 * var(--chroma)) calc(var(--hue) + 157));
  --_ray-stroke: 2.25px;
  --_ray-alpha: 1;
  --_check-stroke: 2.2px;
  --_enter-scale: 0.94;
  --_rise: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--ivory);
  color: var(--slate);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.card {
  width: min(300px, 86vw);
  padding: clamp(28px, 8vw, 36px) clamp(18px, 6vw, 28px) clamp(22px, 6vw, 28px);
  background: var(--paper);
  border: 1px solid var(--oat);
  border-radius: calc(18px * var(--round));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(12px, 4vw, 16px);
}

.mark {
  position: relative;
  width: 52px;
  height: 52px;
}

.burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 128px;
  height: 128px;
  transform: translate(-50%, -50%);
  overflow: visible;
  pointer-events: none;
}

/* pathLength=100 lets one dash pattern serve every ray length:
   offset 100 -> 0 grows the ray outward, 0 -> -100 pulls its tail away. */
.ray {
  fill: none;
  stroke-width: var(--_ray-stroke);
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  opacity: 0;
  animation: burst var(--t) var(--ease-out) infinite;
}
.ray.long { stroke: var(--clay); }
.ray.short {
  stroke: var(--_teal);
  animation-delay: calc(0.04s / var(--speed));
}

.badge {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--_teal);
  display: grid;
  place-items: center;
  opacity: 0;
  animation: arrive var(--t) var(--ease-out) infinite;
}
.badge svg { width: 28px; height: 28px; overflow: visible; }

.check {
  fill: none;
  stroke: var(--paper);
  stroke-width: var(--_check-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  opacity: 0;
  animation: tick var(--t) var(--ease-out) infinite;
}

.copy { display: grid; gap: 4px; }

.title {
  margin: 0;
  font-size: clamp(16px, 4.6vw, 19px);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: rise var(--t) var(--ease-out) infinite;
}

.sub {
  margin: 0;
  font-size: clamp(12px, 3.4vw, 13px);
  color: color-mix(in oklab, var(--slate) 60%, var(--paper));
  opacity: 0;
  animation: rise var(--t) var(--ease-out) infinite;
  animation-delay: calc(0.05s / var(--speed));
}

/* 1% of the 3.2s loop = 32ms. Enter 192ms, exit 160ms. */
@keyframes arrive {
  0% { opacity: 0; transform: scale(var(--_enter-scale)); }
  6%, 86% { opacity: 1; transform: scale(1); }
  91%, 100% { opacity: 0; transform: scale(0.98); }
}

@keyframes tick {
  0%, 5% { stroke-dashoffset: 1; opacity: 0; }
  6% { opacity: 1; }
  13%, 100% { stroke-dashoffset: 0; opacity: 1; }
}

/* Grow 128ms, retract 160ms: the ray is never fully static, so it reads as a flash. */
@keyframes burst {
  0%, 10% { stroke-dashoffset: 100; opacity: 0; }
  11% { opacity: var(--_ray-alpha); }
  14% { stroke-dashoffset: 0; }
  16% { opacity: var(--_ray-alpha); }
  19%, 100% { stroke-dashoffset: -100; opacity: 0; }
}

@keyframes rise {
  0%, 12% { opacity: 0; transform: translateY(var(--_rise)); }
  18%, 86% { opacity: 1; transform: translateY(0); }
  91%, 100% { opacity: 0; transform: translateY(0); }
}

@media (max-width: 380px) {
  .card { padding-inline: 16px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .badge, .title, .sub {
    animation: settle calc(var(--t) * 2) var(--ease-out) infinite;
  }
  .check { animation: none; stroke-dashoffset: 0; opacity: 1; }
  .ray {
    stroke-dashoffset: 0;
    animation: glow calc(var(--t) * 2) var(--ease-out) infinite;
  }
}

@keyframes settle {
  0% { opacity: 0; }
  8%, 86% { opacity: 1; }
  94%, 100% { opacity: 0; }
}

@keyframes glow {
  0%, 8% { opacity: 0; }
  16% { opacity: calc(var(--_ray-alpha) * 0.55); }
  40%, 100% { opacity: 0; }
}
</style>
</head>
<body>
  <div class="card" role="status">
    <div class="mark">
      <svg class="burst" viewBox="-64 -64 128 128" aria-hidden="true">
        <path class="ray long" d="M31 0H50" pathLength="100" transform="rotate(-90)" />
        <path class="ray short" d="M31 0H42" pathLength="100" transform="rotate(-60)" />
        <path class="ray long" d="M31 0H50" pathLength="100" transform="rotate(-30)" />
        <path class="ray short" d="M31 0H42" pathLength="100" transform="rotate(0)" />
        <path class="ray long" d="M31 0H50" pathLength="100" transform="rotate(30)" />
        <path class="ray short" d="M31 0H42" pathLength="100" transform="rotate(60)" />
        <path class="ray long" d="M31 0H50" pathLength="100" transform="rotate(90)" />
        <path class="ray short" d="M31 0H42" pathLength="100" transform="rotate(120)" />
        <path class="ray long" d="M31 0H50" pathLength="100" transform="rotate(150)" />
        <path class="ray short" d="M31 0H42" pathLength="100" transform="rotate(180)" />
        <path class="ray long" d="M31 0H50" pathLength="100" transform="rotate(210)" />
        <path class="ray short" d="M31 0H42" pathLength="100" transform="rotate(240)" />
      </svg>
      <div class="badge">
        <svg viewBox="0 0 24 24" aria-hidden="true">
          <path class="check" d="M6 12.5L10 16.5L18 8" pathLength="1" />
        </svg>
      </div>
    </div>
    <div class="copy">
      <p class="title">Order placed</p>
      <p class="sub">Pickup in about 12 min</p>
    </div>
  </div>
</body>
</html>

The variant family

Same idea, one axis moved. Compare them side by side before you commit.