Atmosphere✨ Premium

Balloon Release

A single 2D canvas floats semi-transparent balloons with specular highlights and supple Verlet strings — balloons pop on click and the pointer gently repels them.

BallonsCanvas 2DVerletLatexPop

You'll get access to the interactive demo with a free account.

This effect is part of Effect.Labs — 811 vanilla effects, some free, some premium. Atmosphere has 57 effects, including 10 free. Explore the category →

3 usage examples

Hero / Landing — SaaS anniversary banner — Balloon Release example 1

① Hero / Landing — SaaS anniversary banner

WhenThe user celebrates their first anniversary with the product, or on the first day of a new annual subscription.
WhyTranslucent balloons in the background create a positive emotion without overwhelming the text message — the effect stays understated thanks to the scrim.
SettingsSlow speed (0.65), 10 balloons max, palette limited to warm tones (red + orange + yellow).
Product component — 'Subscription renewed' card — Balloon Release example 2

② Product component — 'Subscription renewed' card

WhenThe successful renewal notification appears in the dashboard — modal, toast, or full-width card.
WhyThe background effect reinforces the sense of success without distracting from important information (date, amount).
Settings8 balloons max, normal speed, SaaS brand colors, globalAlpha reduced to 0.55 for lightness.
Full-screen invitation — Birthday or baby shower card — Balloon Release example 3

③ Full-screen invitation — Birthday or baby shower card

WhenAn event invitation page or e-card where balloons fill the full height, becoming the main backdrop rather than a supporting element.
WhySemi-transparent balloons rising across the whole surface naturally evoke celebration — Verlet strings and specular highlights add depth that plain emoji cannot match.
Settings14 balloons max, slow speed (0.65) for cinematic flow, full 8-color palette, light scrim so the text stays readable over the balloon backdrop.

How it works

A single <canvas> renders balloons and strings in the same draw pass. Each balloon is an ellipse with an offset radial gradient (bright zone top-left, saturated color at center, dark edge) and a globalAlpha of 0.82 — overlapping balloons tint each other, just like real latex.

Two specular highlights are drawn on top: a blurred white ellipse tilted ~30° (main highlight) and a small secondary dot. A bright rim light outlines the contour. The knot is a darker, vertically stretched ellipse.

The string is a 10-point Verlet chain (gravity, damping 0.986, drag, distance constraints ×4 passes), drawn as a smooth Catmull-Rom curve via cubic béziers. It undulates and trails as the balloon sways or rises. The pointer exerts gentle repulsion within a 90 px radius. A click pops the balloon (elliptical hit-test, topmost first) with 8 canvas fragments and a radial flash.

An IntersectionObserver cuts the RAF when the scene scrolls off-screen — zero wasted CPU outside the viewport.

Accessibility

  • prefers-reduced-motion: if the OS signals a preference to reduce motion, 8 balloons are drawn statically once, strings straight. No animation runs, no RAF is launched.
  • The <canvas> carries aria-hidden="true" — overlay text content is accessible to screen readers independently of the canvas.
  • The scene carries role="img" and an aria-label describing the effect in plain language.
  • CTA buttons embedded in the scene meet WCAG AA contrast ratios (≥ 4.5:1 over the scrim).
  • Keyboard navigation: the CTA in the overlay remains in the normal tab order.

Browser compatibility

Requires Canvas 2D Context and requestAnimationFrame — supported in all modern browsers.

Chrome 110+✓ Full
Firefox 110+✓ Full
Safari 16+✓ Full
Edge 110+✓ Full
Mobile iOS✓ Touch OK
Android Chrome✓ Full

If <code>canvas</code> is not supported, the parent <code>&lt;div&gt;</code> displays with a dark background — no JS errors, the page stays functional.

The code

HTML structure to paste into your page (CSS + JS available with a premium account):

index.html — structure
<div class="bln-stage" role="img" aria-label="Translucent colored balloons floating with supple strings — click to pop">
  <canvas class="bln-canvas" aria-hidden="true"></canvas>

  <!-- Optional: scrim + overlay content -->
  <div class="bln-scrim" aria-hidden="true"></div>
  <div class="bln-banner-content">
    <h2 class="bln-banner-title">Your message</h2>
    <button class="bln-btn-cta">CTA</button>
  </div>
</div>
🔒 Unlock the full code — from €2.99 the first month

Full HTML + CSS + JS, copy-paste ready — with hundreds of premium effects.

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
data-colors 8 colors Hex array of latex colors — swap in your brand palette.
data-max 12 Maximum simultaneous balloons on screen (pool of 22 max). Drop to 6–8 for a light background.
data-speed 1.0 Rise speed multiplier. 0.65 = romantic & slow, 1.7 = festive & fast.
BLN.fire(n) Release n additional balloons immediately — trigger it on a business event (payment confirmed, milestone reached).
BLN.setMaxActive(n) 12 Adjusts the cap on the fly without reloading the page.
BLN.setSpeedFactor(f) 1.0 Changes the speed of all live balloons in real time.

FAQ

Yes, the effect is 100% vanilla: a single 2D canvas, zero npm dependencies. Copy the HTML, CSS, and JS and you're done. Compatible with Angular, React, Vue, and Svelte — wrap it in a component or directive; it touches nothing outside its own canvas.
The public API exposes BLN.fire(n) to release n additional balloons, BLN.setMaxActive(n) to adjust the cap, and BLN.setSpeedFactor(f) to change speed — all without reloading the page. Example: after a Stripe payment confirmation, call BLN.fire(16) from the front-end callback.
Yes. If prefers-reduced-motion: reduce is set in the operating system, balloons are drawn statically once with simplified straight strings. No animation runs, no requestAnimationFrame is launched — the effect stays visually present without causing motion sickness or harming focus.