Gestures API

Detailed listing of all gesture related features of Svelte Motion. A lot of the wording is directly copied from framer-motion, Copyright (c) 2018 Framer B.V. MIT License.

DragDirection

"x" | "y"

DragElastic

boolean | number | Partial<BoundingBox2D >

DragHandlers

interface

DraggableProps

interface extends DragHandlers

EventInfo

{ point: Point2D }

FocusHandlers

interface

HoverHandlers

interface

InertiaOptions

Partial<Omit<Inertia ,'velocity' | 'type'>>
All or parts of Inertia props, except 'velocity' and 'type'

PanHandlers

interface

PanInfo

interface
Passed in to pan event handlers like `onPan` the `PanInfo` object contains
information about the current state of the tap gesture such as its
`point`, `delta`, `offset` and `velocity`.

TapHandlers

interface

TapInfo

{ point: Point2D }
Contains `x` and `y` values for the tap gesture relative to the device or page.

UseDOMEvent

SvelteComponent<Props: UseDomEventProps ,Events: {}, Slots:{default:{}}>
Attaches an event listener directly to the provided DOM element.

Bypassing Sveltes's event system can be desirable, for instance when attaching non-passive event handlers.

UseDomEventProps

interface
SharedLayoutContext