Gesture dock Gagan
Bidirectional gesture handle at the bottom of the home screen. Drag up = add expense. Drag down = settle. Shows a preview pill with direction-appropriate content once the gesture is armed. The dock replaces a traditional FAB on the home screen.
States
Resting
At rest: a 36×4px pill handle at 35% opacity, flanked by two directional hints in mono uppercase. The hints are subtle — they're teaching the gesture, not competing with content.
Dragging up — add expense armed
Once the drag crosses the 50px up threshold, the hints fade and an ink pill appears: "+ add expense". The handle dims further. Releasing past this point opens the add-expense sheet. Releasing short of it snaps the dock back to rest.
Dragging down — settle armed
Past the 30px down threshold (shorter — settle is a secondary action), a teal pill appears: "⇌ settle up". Releasing here opens the settle flow. The lower threshold for settle is intentional — it's a slightly less deliberate gesture, so it arms faster.
Spec
| Property | Value | Notes |
|---|---|---|
| Up threshold (arm) | 50px | Above this, show "add expense" pill and commit on release |
| Down threshold (arm) | 30px | Below this, show "settle up" pill and commit on release |
| Handle follow factor (up) | 0.32× | Handle nudges upward at 32% of finger travel — gives resistance |
| Handle follow factor (down) | 0.6× | Looser on the settle direction — less resistance |
| Snap-back duration | 320ms | var(--ease-spring) — handle bounces back on release below threshold |
| Pill fade-in | 140ms | var(--ease-out), opacity + translateY(4px → 0) |
| Handle opacity (rest) | 35% | Subtle — does not compete with content |
| Handle opacity (armed) | 15% | Dims further once gesture is committed |
Anatomy
| Part | Element | Notes |
|---|---|---|
| Surface | .gdock-surface | Paper background, top border, safe-area aware bottom padding. |
| Directional hints | .gdock-hints | Two mono labels flanking the handle. Fade out once gesture arms. |
| Handle | .gdock-handle | 36×4px pill. Follows finger at fractional rate. Center-positioned. |
| Preview pill | .gdock-preview | Ink (add) or teal (settle). Appears after arm threshold. Fades on snap-back. |
Usage
Accessibility
role="region" and aria-label="Quick actions". The handle itself is presentational — aria-hidden="true". The preview pill, when visible, should be announced via a live region: aria-live="polite" on a visually hidden element that updates to "Add expense ready" or "Settle up ready" at the arm threshold.
See it in context
Interactive prototype — this component is live below. Tap, swipe, and drag to explore.
gestures. The dock appears at the bottom — drag up to add an expense, drag down to settle up. Watch the preview pill animate as you drag.