> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Button press (Spring Squish and sparkles)

DEV's pick (27/11/2026). Every pill, round and card button presses with
[`SquishPressable`](https://github.com/leapgame/leap-sim-piano/blob/f794b594016038c483e2d20b6af56aea0ae1b982/src/components/press/SquishPressable.tsx): `PrimaryButton`,
`GlassCircleButton` (and its close / back / forward / glyph wrappers) and `SessionActionButton`
use it already; a new raw button should too.

## What a press does

| Moment                                | What happens                                                                  |
| ------------------------------------- | ----------------------------------------------------------------------------- |
| Finger down                           | Scale to 0.94 over 90 ms                                                      |
| Release                               | Bounce 0.94 → 1.035 → 1 over 250 ms; haptic, sparkles and the CTA sound start |
| 180 ms later                          | `onPress` runs (a tap shorter than the press-in first plays the rest of it)   |
| Drag off, or a scroll takes the touch | Back to rest, nothing runs                                                    |

- **One action waits at a time** across the app (`deferred-press.ts`): other squish buttons ignore
  taps meanwhile. A plain-press control (a backdrop) is not held back.
- An unmount or a `disabled` while it waits drops the action. A recycled list row runs the
  action captured at the release, so the row that was tapped.
- **Reduce Motion:** the plain press, the action at once, no sparkles; the CTA sound still plays.
- **The CTA sound** (`cta_press`, DEV 02/12/2026) goes with the sparkles: every button with `burst`
  plays it, under either press. A disabled or loading button ("Coming soon") takes no press, so it
  stays silent, as do secondary pills, close / back rounds and tabs.

## Keeping the plain press

Pass `pressEffect="default"` (`PrimaryButton`, `GlassCircleButton`) or `effect="default"`
(`SquishPressable`), or leave a raw `Pressable` as it is. It stays for:

- gameplay and anything answered in time: the play HUD, Hit Timing, the Learn top bar (Back
  included), hint and final-stage controls, drill "Skip";
- the keyboard screen's controls;
- toggles, segmented controls, tabs, plan and song selection cards, preview covers;
- text links, settings rows, dropdowns, popup backdrops, dev and lab buttons;
- a pill that takes no touches inside another press target (the Shop's CTA and price pills).

The Shop's "See All Plans" link keeps its own [`ShopPressable`](https://github.com/leapgame/leap-sim-piano/blob/f794b594016038c483e2d20b6af56aea0ae1b982/src/features/shop/components/ShopPressable.tsx).

## Sparkles

A light twinkle (10 sparks, stars and notes; 6 under 100 pt wide) off the button's edge, and a
pale ring from the touch point. Numbers: `press-burst.model.ts`; colours: `pressBurst*` tokens;
sprites: `src/assets/shared/press_*.png`.

- **`PrimaryButton`:** by variant — `premium`, `gradientLight`, `gradientLearn`, `gradientDeal`
  (`resolvePressBurst`).
- **Elsewhere, `burst`:** the filled result / pause pill, the unlock sheet's video and buy pills,
  the tab bar's Premium button, the Shop's CTA and packs on sale, the "Remove forced ads" card.
  A whole card passes `burstAnchorRef` so the sparkles gather round its price pill (the anchor
  View needs `collapsable={false}`).

**Hosts.** [`PressBurstHost`](https://github.com/leapgame/leap-sim-piano/blob/f794b594016038c483e2d20b6af56aea0ae1b982/src/components/press/PressBurstHost.tsx) is mounted last in the
root layout. A native `<Modal>` draws over it, so **a new modal with a sparkling button mounts a
host as its last child** — without one its sparkles draw underneath and are not seen. The host
mounted last takes the bursts. Its pool (two bursts) is mounted with it, so a tap creates no
views and renders nothing; only transforms and opacities animate, on the UI thread. These are UI
views, not gameplay sprites: no sprite-engine layer and no GPU pipeline to prewarm. A burst in a
popup that its own action closes leaves with the popup.

***

<small>Source: [`docs/button-press.md`](https://github.com/leapgame/leap-sim-piano/blob/f794b594016038c483e2d20b6af56aea0ae1b982/docs/button-press.md)</small>
