gestures
Skill4 starsChanged 10 days agoMITView on GitHub
Build or fix web drag, swipe, sheet, reorder, and hold interactions: direct tracking, rubber banding, release velocity, momentum, snap points, and interruption. Not native React Native or Swift.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- emilkowalski/skilltheir own version, first seen Nov 9, 2026
- emilkowalski/skillstheir own version, first seen Nov 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- emilkowalski/skill★ 55ksame name
- emilkowalski/skills★ 55ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository117 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibilitySkill
- agent-watchdogSkill
- aipSkill
- animateSkill
- animation-performanceSkill
- animation-vocabularySkill
- ask-benSkill
- ask-sonnerSkill
- bazelSkill
- bend-lawsSkill
- blast-radiusSkill
- brain-dumpSkill
- break-uiSkill
- ci-fixesSkill
- codebase-designSkill
- codex-compatSkill
- codexSkill
- commit-push-prSkill
- connect-querySkill
- create-verification-skillSkill
- demoSkill
- development-lifecycleSkill
- diagnosing-bugsSkill
- docsSkill
- dogfoodSkill
- domain-modelingSkill
- e2e-testingSkill
- effect-tsSkill
- effect-v3-to-v4Skill
- efficient-frontierSkill
- eli5Skill
- excalidraw-diagramSkill
- extend-harnessSkill
- frontend-invariantsSkill
- frontend-starter-kitSkill
- full-sendSkill
- golang-reviewSkill
- golangSkill
- goSkill
- grillingSkill
- handoffSkill
- hook-auditSkill
- implement-specSkill
- improve-animationsSkill
- improve-codebase-architectureSkill
- improveSkill
- launchdarklySkill
- lie-detectorSkill
- maintain-verification-skillSkill
- make-pr-easy-to-reviewSkill
- mobile-nativeSkill
- plan-arbiterSkill
- plow-aheadSkill
- postgresqlSkill
- primeSkill
- productSkill
- protobufSkill
- prototypeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Consider Vaul only if it fits the stack and requested scope.
- Distinctive: line 35
Resolve release: Read current displacement and recent signed velocity on the owned axis.
- Distinctive: line 39
Keep one release driver: library momentum and a custom spring must not compete.
- Distinctive: line 43
Keep related overlay/scale values derived from the same drag progress.
- Distinctive: line 55
Use the dependency-loading contract.
- Distinctive: line 62
Use the real component; record normal-speed/frame-stepped interaction only when needed to resolve continuity.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Make direct manipulation follow the pointer, then settle predictably after release. Adapted from Emil Kowalski; source and compatibility. Questions/reviews return guidance or findings without edits; build/fix follows project TDD, verification and delivery. Loading this skill grants no installs or device access.
Choose the owner
Inspect the component, input paths, installed library/version and existing UI wrapper. Reuse its drawer, dialog, toast or reorder primitive before hand-rolling physics. Consider Vaul only if it fits the stack and requested scope; retain its focus trap, Escape, focus return, scroll locking and dismissal behavior. A gesture is not a reason to replace a working library. Check installed types and current official docs for APIs.
Gesture loop
- Define intent. Identify the axis, handle, bounds/snap points, commit action, cancel path and non-drag alternative. Prefer native scroll/snap when it fits. Separate press feedback from activation; preserve accessible click/submit controls.
- Arbitrate input. Let scrolling, text selection and interactive children keep
their native behavior. For custom pointer handling, track the active pointer id,
capture only the owned drag, and handle
pointercancel,lostpointercapture, extra pointers and unmount. Cancellation must not commit a dismiss/delete/reorder. Set scopedtouch-actionbefore the gesture; preserve pinch zoom. For phone/browser symptoms, load mobile-native. - Track directly. Within bounds, map pointer displacement 1:1 from the element's current visual position. Use the library's motion value or a direct transform, without a tracking spring/transition or per-move React renders. Apply resistance only beyond the permitted boundary. Avoid driving large descendant trees through an inherited per-frame CSS variable; profile the actual update path.
- Resolve release. Read current displacement and recent signed velocity on the owned axis. Choose a snap/dismiss target from distance OR a deliberate flick in the allowed direction; use consistent units. Reposition-only drags can stop on release. Fling interactions can use inertia; spring settling can inherit velocity. Keep one release driver: library momentum and a custom spring must not compete.
- Stay catchable. On re-grab, stop the release driver, read its current position, and rebase the new drag origin there. Retarget from the current value/velocity where supported. Neither a spring nor CSS automatically guarantees this handoff. Keep related overlay/scale values derived from the same drag progress; prevent stale completion callbacks from unmounting or committing after interruption.
- Settle accessibly. Under reduced motion, retain necessary direct tracking but remove decorative bounce and long momentum; settle promptly or instantly. Keep the outcome available via buttons/keyboard and a non-drag pointer path. Holds show elapsed time linearly, cancel on early release/escape/lost capture, and commit once. A hold is not the sole way to perform an action or a substitute for confirmation.
For threshold units, resistance, sheets and hold-specific checks, read REFERENCE.md. Treat its numbers as tuning candidates, not fixed rules. For multi-element timing and transition craft, load animate; for measured drag stutter, load animation-performance. Use the dependency-loading contract.
Verify and hand off
Exercise slow drag, short fast flick, reverse direction, boundary resistance, snap-back, re-grab during settling, nested scroll, child activation, cancellation, multiple pointers, resize/unmount and reduced motion. Test keyboard/non-drag equivalence and retained focus. Use the real component; record normal-speed/frame-stepped interaction only when needed to resolve continuity. Code inspection cannot prove feel, frame rate or phone behavior. Physical-device checks require available authorized hardware; report missing coverage without exposing a dev server or installing tooling just to satisfy this skill.
Report track/release choices, thresholds and units, cancellation/alternative behavior, observed verification and remaining device limits. Keep review findings separate from taste.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

