sveltekitbook
10

Gestures

Wheel right, swipe left, press →. The same intent, three input devices.

The page does not scroll between sections — it pages. `createPager` listens for a horizontal wheel gesture, a touch drag, or an arrow keypress, and turns all three into the same outcome: next page or previous page. The view-transition API animates the title across the swap. On a phone you swipe; on a laptop you scroll; on a keyboard you press →. The book feels the same on each.