Feature Library

Comic sound effects and speech balloons

0.36 CPU ms
A still of the Comic sound effects and speech balloons demo
Still
The live demo starts when it’s in view.Click anything · drag the heroes or a balloon (double-click it to send it back) · pick an age up top

Sound-effect words that pop with squash and stretch over an inked starburst, speech, thought and shout balloons whose tails keep pointing at their target as it…

What it costs a frame

0.36 ms
GPU
not used
CPU, median
0.36 ms
CPU, 95th pct
0.55 ms
Draw calls
0
Weight
Light

Measured 7 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Fires a sound effect every 0.55 s at a random spot and flies Captain Cache round his panel, so every frame his balloon is re-placed and its tail rebuilt; the other two balloons are only rechecked. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed0.360.55
apple · Apple A19 Proin a browser tab · 16 November 2026not timed0.540.74
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed0.591.02

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. Playful onboarding and empty states
  2. Game and kids’ interfaces
  3. Tooltips with character
  4. Celebrating an action (saved, sent, levelled up)
  5. Themed landing pages
  6. Print-style illustrations

Pitfalls, in brief

  1. The tails are rechecked every frame from getBoundingClientRect (the target and the host): fine for a handful of balloons, but pass loop: false and call update() from your own loop if you already have one, so it is one read per frame, not two loops.
  2. Overlapping body and tail only read as one shape because the path is non-zero and every piece runs clockwise: if you draw your own tail, keep its winding the same or the overlap cuts a hole.
  3. The layer is placed in the host’s own pixels and scrolls with it; the host becomes position: relative if it was static.
  4. An SVG mask with maskUnits="userSpaceOnUse" needs its own x, y, width and height: the default region is a share of the 1 px SVG the shapes overflow, which hides the outline.
  5. Halftones redraw only on resize and when the age changes: changing --kp-* colours by hand needs a draw() call.
2 more in brief
  1. The layer is a polite live region, so every word and balloon is read out.
  2. The lettering is the page’s own sans serif at weight 900 (Inter here): a face without a heavy weight looks thin.
7 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac. Fully custom code.

Ben Day, Ben-Day dots (1879): The flat dot tints of old comics that the .kp-dots fill imitates. A printing process, not code.

comicsspeech balloonssound effectshalftoneben-day dotssvgcanvas 2dweb animationsthemesaccessibilityno dependencies

Near it in the frame