Skip to main content

Types Overview

All public TypeScript types are exported from react-native-drax. This section documents the key type categories.

Import

import type {
Position,
DraxViewProps,
DraxDragEventData,
SortableReorderEvent,
// ... etc
} from 'react-native-drax';

Categories

CategoryKey TypesPage
GeometryPosition, ViewDimensions, DraxViewMeasurementsGeometry
Event DataDraxDragEventData, DraxDragWithReceiverEventData, DraxMonitorEventDataEvent Data
View StateDraxViewState, DraxTrackingStatus, DraxRenderContentPropsView State
SortableSortableReorderEvent, UseSortableListOptions, SortableListHandleSortable
BoardSortableBoardTransferEvent, UseSortableBoardOptionsBoard
SnapDraxSnapbackTarget, DraxSnapData, SnapAlignmentSnap

Enums

import {
DraxViewDragStatus, // Inactive, Dragging, Released
DraxViewReceiveStatus, // Inactive, Receiving
DraxSnapbackTargetPreset, // Default, None
AutoScrollDirection, // Back, None, Forward
} from 'react-native-drax';

Type Guards

import { isPosition } from 'react-native-drax';

if (isPosition(value)) {
console.log(value.x, value.y);
}