Feature Library

Throw to commit

<0.01 CPU ms
A still of the Throw to commit demo
Still
The live demo starts when it’s in view.Drag the top card onto a tray or throw it at one · swipe sideways for the next · or press 1 2 3, ↑ ↓ Enter, ← →

Drag a card and throw it at a tray, a folder or a bin to act on it: it lands when let go near one, or when thrown fast enough and on aim; otherwise it springs back.

What it costs a frame

<0.01 ms
GPU
not used
CPU, median
<0.01 ms
CPU, 95th pct
0.71 ms
Draw calls
0
Weight
Light

Measured 3 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: Measured with the demo throwing for itself: a scripted pointer drags the top card and throws it at a tray about every 2.4 s, then undoes it, so the frames hold the per-move work (velocity, aim at three trays, the highlight and the aim overlay), the flight in and the return. 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 timed<0.010.71
apple · Apple A19 Proin a browser tab · 16 November 2026not timed<0.012.24
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed<0.011.52

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. Inbox and triage screens
  2. Kanban columns and folders
  3. Photo culling
  4. Flash cards and review queues
  5. Buy and confirm slots
  6. Touch kiosks

Pitfalls, in brief

  1. Always give every target a button or a key as well: a throw is fast for some people and impossible for others (a screen reader, a switch, a trackpad, a shaky hand).
  2. The card sets touch-action: none so a finger can drag it: on a phone, the page cannot be scrolled by dragging that card.
  3. The module writes the card’s transform while it is dragged and flown: lay a stack out with translate and scale (as the demo does), or wrap the card, or your layout transform is lost.
  4. An ancestor with overflow: hidden (or clip, or contain: paint) clips the card in flight; keep the card and its targets inside one unclipped box, or fly a clone in a fixed layer.
  5. Targets are measured when a drag starts: anything that moves them mid-drag (a scroll, a reflow) makes the aim wrong until the next drag.
3 more in brief
  1. Speed thresholds are in CSS px per ms, not device pixels: 0.7 is a brisk flick on a laptop; on a large touch screen people throw harder, so try 0.9 to 1.2.
  2. A drag of a few pixels is still a click: presses on buttons, links and fields inside the card (or anything with data-throw-ignore) are left to them.
  3. onCommit runs after the flight; the card is then invisible (opacity 0, filled forwards).
8 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.

gesturesdrag and dropflingvelocitytouchkeyboardaccessibilityweb animationsdomno dependencies

Near it in the frame