@types/react-beautiful-dnd
- Version 13.1.8
- Published
- 24.9 kB
- 1 dependency
- MIT license
Install
npm i @types/react-beautiful-dnd
yarn add @types/react-beautiful-dnd
pnpm add @types/react-beautiful-dnd
Overview
TypeScript definitions for react-beautiful-dnd
Index
Variables
Functions
Classes
Interfaces
Type Aliases
- Announce
- Axis
- ContextId
- Direction
- DraggableChildrenFn
- DraggableId
- DroppableId
- DroppableMode
- DropReason
- ElementId
- Id
- ImpactLocation
- InOutAnimationMode
- MovementMode
- Omit
- OnBeforeCaptureResponder
- OnBeforeDragStartResponder
- OnDragEndResponder
- OnDragStartResponder
- OnDragUpdateResponder
- Sensor
- State
- StateWhenUpdatesAllowed
- TryGetLock
- TypeId
Variables
variable useKeyboardSensor
const useKeyboardSensor: Sensor;
variable useMouseSensor
const useMouseSensor: Sensor;
variable useTouchSensor
const useTouchSensor: Sensor;
Functions
function resetServerContext
resetServerContext: () => void;
Classes
class DragDropContext
class DragDropContext extends React.Component<DragDropContextProps> {}
class Draggable
class Draggable extends React.Component<DraggableProps> {}
class Droppable
class Droppable extends React.Component<DroppableProps> {}
Interfaces
interface BeforeCapture
interface BeforeCapture {}
property draggableId
draggableId: DraggableId;
property mode
mode: MovementMode;
interface BoxModel
interface BoxModel {}
property border
border: Spacing;
property borderBox
borderBox: Rect;
property contentBox
contentBox: Rect;
property margin
margin: Spacing;
property marginBox
marginBox: Rect;
property padding
padding: Spacing;
property paddingBox
paddingBox: Rect;
interface ClientPositions
interface ClientPositions {}
property borderBoxCenter
borderBoxCenter: Position;
property offset
offset: Position;
property selection
selection: Position;
interface CollectingState
interface CollectingState extends Omit<DraggingState, 'phase'> {}
property phase
phase: 'COLLECTING';
interface Combine
interface Combine {}
property draggableId
draggableId: DraggableId;
property droppableId
droppableId: DroppableId;
interface CombineImpact
interface CombineImpact {}
interface CompletedDrag
interface CompletedDrag {}
property afterCritical
afterCritical: LiftEffect;
property critical
critical: Critical;
property impact
impact: DragImpact;
property result
result: DropResult;
interface Critical
interface Critical {}
interface DimensionMap
interface DimensionMap {}
property draggables
draggables: DraggableDimensionMap;
property droppables
droppables: DroppableDimensionMap;
interface Displaced
interface Displaced {}
interface DisplacedBy
interface DisplacedBy {}
interface Displacement
interface Displacement {}
property draggableId
draggableId: DraggableId;
property shouldAnimate
shouldAnimate: boolean;
interface DisplacementGroups
interface DisplacementGroups {}
interface DisplacementMap
interface DisplacementMap {}
index signature
[key: string]: Displacement;
interface DragActions
interface DragActions {}
property cancel
cancel: (args?: StopDragOptions) => void;
property drop
drop: (args?: StopDragOptions) => void;
property isActive
isActive: () => boolean;
property shouldRespectForcePress
shouldRespectForcePress: () => boolean;
interface DragDropContextProps
interface DragDropContextProps extends Responders {}
DragDropContext
property children
children: React.ReactNode | null;
property dragHandleUsageInstructions
dragHandleUsageInstructions?: string | undefined;
property enableDefaultSensors
enableDefaultSensors?: boolean | undefined;
property nonce
nonce?: string | undefined;
property sensors
sensors?: Sensor[] | undefined;
interface DraggableDescriptor
interface DraggableDescriptor {}
property droppableId
droppableId: DroppableId;
property id
id: DraggableId;
property index
index: number;
property type
type: TypeId;
interface DraggableDimension
interface DraggableDimension {}
property client
client: BoxModel;
property descriptor
descriptor: DraggableDescriptor;
property displaceBy
displaceBy: Position;
property page
page: BoxModel;
property placeholder
placeholder: Placeholder;
interface DraggableDimensionMap
interface DraggableDimensionMap {}
index signature
[key: string]: DraggableDimension;
interface DraggableIdMap
interface DraggableIdMap {}
index signature
[id: string]: true;
interface DraggableLocation
interface DraggableLocation {}
property droppableId
droppableId: DroppableId;
property index
index: number;
interface DraggableOptions
interface DraggableOptions {}
property canDragInteractiveElements
canDragInteractiveElements: boolean;
property isEnabled
isEnabled: boolean;
property shouldRespectForcePress
shouldRespectForcePress: boolean;
interface DraggableProps
interface DraggableProps {}
property children
children: DraggableChildrenFn;
property disableInteractiveElementBlocking
disableInteractiveElementBlocking?: boolean | undefined;
property draggableId
draggableId: DraggableId;
property index
index: number;
property isDragDisabled
isDragDisabled?: boolean | undefined;
property shouldRespectForcePress
shouldRespectForcePress?: boolean | undefined;
interface DraggableProvided
interface DraggableProvided {}
property draggableProps
draggableProps: DraggableProvidedDraggableProps;
property dragHandleProps
dragHandleProps: DraggableProvidedDragHandleProps | null | undefined;
property innerRef
innerRef: (element: HTMLElement | null) => void;
interface DraggableProvidedDraggableProps
interface DraggableProvidedDraggableProps {}
property "data-rbd-draggable-context-id"
'data-rbd-draggable-context-id': string;
property "data-rbd-draggable-id"
'data-rbd-draggable-id': string;
property onTransitionEnd
onTransitionEnd?: React.TransitionEventHandler<any> | undefined;
property style
style?: DraggingStyle | NotDraggingStyle | undefined;
interface DraggableProvidedDragHandleProps
interface DraggableProvidedDragHandleProps {}
property "aria-describedby"
'aria-describedby': ElementId;
property "data-rbd-drag-handle-context-id"
'data-rbd-drag-handle-context-id': ContextId;
property "data-rbd-drag-handle-draggable-id"
'data-rbd-drag-handle-draggable-id': DraggableId;
property draggable
draggable: boolean;
property onDragStart
onDragStart: React.DragEventHandler<any>;
property role
role: string;
property tabIndex
tabIndex: number;
interface DraggableRubric
interface DraggableRubric {}
property draggableId
draggableId: DraggableId;
property source
source: DraggableLocation;
property type
type: TypeId;
interface DraggableStateSnapshot
interface DraggableStateSnapshot {}
property combineTargetFor
combineTargetFor: DraggableId | null | undefined;
property combineWith
combineWith: DraggableId | null | undefined;
property draggingOver
draggingOver: DroppableId | null | undefined;
property dropAnimation
dropAnimation: DropAnimation | null | undefined;
property isClone
isClone: boolean;
property isDragging
isDragging: boolean;
property isDropAnimating
isDropAnimating: boolean;
property mode
mode: MovementMode | null | undefined;
interface DraggingState
interface DraggingState {}
property afterCritical
afterCritical: LiftEffect;
property critical
critical: Critical;
property current
current: DragPositions;
property dimensions
dimensions: DimensionMap;
property forceShouldAnimate
forceShouldAnimate: boolean | null | undefined;
property impact
impact: DragImpact;
property initial
initial: DragPositions;
property isDragging
isDragging: true;
property isWindowScrollAllowed
isWindowScrollAllowed: boolean;
property movementMode
movementMode: MovementMode;
property onLiftImpact
onLiftImpact: DragImpact;
property phase
phase: 'DRAGGING';
property scrollJumpRequest
scrollJumpRequest: Position | null | undefined;
property viewport
viewport: Viewport;
interface DraggingStyle
interface DraggingStyle {}
property boxSizing
boxSizing: 'border-box';
property height
height: number;
property left
left: number;
property opacity
opacity: number | undefined;
This value will actually be
null
instead ofundefined
.The type is fudged because
null
is not compatible with theReact.CSSProperties
type.The
style
prop should interpretnull
andundefined
the same way.
property pointerEvents
pointerEvents: 'none';
property position
position: 'fixed';
property top
top: number;
property transform
transform: string | undefined;
This value will actually be
null
instead ofundefined
.The type is fudged because
null
is not compatible with theReact.CSSProperties
type.The
style
prop should interpretnull
andundefined
the same way.
property transition
transition: string;
property width
width: number;
property zIndex
zIndex: number;
interface DragImpact
interface DragImpact {}
property at
at: ImpactLocation | null | undefined;
property displaced
displaced: DisplacementGroups;
property displacedBy
displacedBy: DisplacedBy;
interface DragPositions
interface DragPositions {}
interface DragUpdate
interface DragUpdate extends DragStart {}
property combine
combine: Combine | null | undefined;
property destination
destination: DraggableLocation | null | undefined;
interface DropAnimatingState
interface DropAnimatingState {}
property completed
completed: CompletedDrag;
property dimensions
dimensions: DimensionMap;
property dropDuration
dropDuration: number;
property newHomeClientOffset
newHomeClientOffset: Position;
property phase
phase: 'DROP_ANIMATING';
interface DropAnimation
interface DropAnimation {}
Draggable
property curve
curve: string;
property duration
duration: number;
property moveTo
moveTo: Position;
property opacity
opacity: number | undefined;
This value will actually be
null
instead ofundefined
.The type is fudged because
null
is not compatible with theReact.CSSProperties
type.The
style
prop should interpretnull
andundefined
the same way.
property scale
scale: number | undefined;
This value will actually be
null
instead ofundefined
.The type is fudged because
null
is not compatible with theReact.CSSProperties
type.The
style
prop should interpretnull
andundefined
the same way.
interface DroppableDescriptor
interface DroppableDescriptor {}
interface DroppableDimension
interface DroppableDimension {}
property axis
axis: Axis;
property client
client: BoxModel;
property descriptor
descriptor: DroppableDescriptor;
property frame
frame: Scrollable | null | undefined;
property isCombineEnabled
isCombineEnabled: boolean;
property isEnabled
isEnabled: boolean;
property isFixedOnPage
isFixedOnPage: boolean;
property page
page: BoxModel;
property subject
subject: DroppableSubject;
interface DroppableDimensionMap
interface DroppableDimensionMap {}
index signature
[key: string]: DroppableDimension;
interface DroppableIdMap
interface DroppableIdMap {}
index signature
[id: string]: true;
interface DroppableProps
interface DroppableProps {}
property direction
direction?: Direction | undefined;
property droppableId
droppableId: DroppableId;
property getContainerForClone
getContainerForClone?: (() => HTMLElement) | undefined;
property ignoreContainerClipping
ignoreContainerClipping?: boolean | undefined;
property isCombineEnabled
isCombineEnabled?: boolean | undefined;
property isDropDisabled
isDropDisabled?: boolean | undefined;
property mode
mode?: DroppableMode | undefined;
property renderClone
renderClone?: DraggableChildrenFn | undefined;
property type
type?: TypeId | undefined;
method children
children: ( provided: DroppableProvided, snapshot: DroppableStateSnapshot) => React.ReactElement<HTMLElement>;
interface DroppableProvided
interface DroppableProvided {}
property droppableProps
droppableProps: DroppableProvidedProps;
property innerRef
innerRef: (element: HTMLElement | null) => void;
property placeholder
placeholder: React.ReactNode;
interface DroppableProvidedProps
interface DroppableProvidedProps {}
Droppable
property "data-rbd-droppable-context-id"
'data-rbd-droppable-context-id': ContextId;
property "data-rbd-droppable-id"
'data-rbd-droppable-id': DroppableId;
interface DroppablePublish
interface DroppablePublish {}
property droppableId
droppableId: DroppableId;
property scroll
scroll: Position;
interface DroppableStateSnapshot
interface DroppableStateSnapshot {}
property draggingFromThisWith
draggingFromThisWith: DraggableId | null | undefined;
property draggingOverWith
draggingOverWith: DraggableId | null | undefined;
property isDraggingOver
isDraggingOver: boolean;
property isUsingPlaceholder
isUsingPlaceholder: boolean;
interface DroppableSubject
interface DroppableSubject {}
property active
active: Rect | null | undefined;
property page
page: BoxModel;
property withPlaceholder
withPlaceholder: PlaceholderInSubject | null | undefined;
interface DropPendingState
interface DropPendingState extends Omit<DraggingState, 'phase'> {}
interface DropResult
interface DropResult extends DragUpdate {}
property reason
reason: DropReason;
interface FluidDragActions
interface FluidDragActions extends DragActions {}
property move
move: (clientSelection: Position) => void;
interface HorizontalAxis
interface HorizontalAxis {}
property crossAxisEnd
crossAxisEnd: 'bottom';
property crossAxisLine
crossAxisLine: 'y';
property crossAxisSize
crossAxisSize: 'height';
property crossAxisStart
crossAxisStart: 'top';
property direction
direction: 'horizontal';
property end
end: 'right';
property line
line: 'x';
property size
size: 'width';
property start
start: 'left';
interface IdleState
interface IdleState {}
property completed
completed: CompletedDrag | null | undefined;
property phase
phase: 'IDLE';
property shouldFlush
shouldFlush: boolean;
interface LiftEffect
interface LiftEffect {}
property displacedBy
displacedBy: DisplacedBy;
property effected
effected: DraggableIdMap;
property inVirtualList
inVirtualList: boolean;
interface LiftRequest
interface LiftRequest {}
property draggableId
draggableId: DraggableId;
property scrollOptions
scrollOptions: ScrollOptions;
interface NotDraggingStyle
interface NotDraggingStyle {}
property transform
transform: string | undefined;
This value will actually be
null
instead ofundefined
.The type is fudged because
null
is not compatible with theReact.CSSProperties
type.The
style
prop should interpretnull
andundefined
the same way.
property transition
transition: 'none' | undefined;
This value will actually be
null
instead ofundefined
.The type is fudged because
null
is not compatible with theReact.CSSProperties
type.The
style
prop should interpretnull
andundefined
the same way.
interface PagePositions
interface PagePositions {}
property borderBoxCenter
borderBoxCenter: Position;
property offset
offset: Position;
property selection
selection: Position;
interface Placeholder
interface Placeholder {}
interface PlaceholderInSubject
interface PlaceholderInSubject {}
property increasedBy
increasedBy: Position | null | undefined;
property oldFrameMaxScroll
oldFrameMaxScroll: Position | null | undefined;
property placeholderSize
placeholderSize: Position;
interface PreDragActions
interface PreDragActions {}
property abort
abort: () => void;
property fluidLift
fluidLift: (clientSelection: Position) => FluidDragActions;
property isActive
isActive: () => boolean;
property shouldRespectForcePress
shouldRespectForcePress: () => boolean;
property snapLift
snapLift: () => SnapDragActions;
interface Published
interface Published {}
interface Rect
interface Rect {}
interface ReorderImpact
interface ReorderImpact {}
property destination
destination: DraggableLocation;
property type
type: 'REORDER';
interface ResponderProvided
interface ResponderProvided {}
property announce
announce: Announce;
interface Responders
interface Responders {}
property onBeforeCapture
onBeforeCapture?: OnBeforeCaptureResponder | undefined;
property onBeforeDragStart
onBeforeDragStart?: OnBeforeDragStartResponder | undefined;
property onDragEnd
onDragEnd: OnDragEndResponder;
property onDragStart
onDragStart?: OnDragStartResponder | undefined;
property onDragUpdate
onDragUpdate?: OnDragUpdateResponder | undefined;
interface Scrollable
interface Scrollable {}
property frameClient
frameClient: BoxModel;
property pageMarginBox
pageMarginBox: Rect;
property scroll
scroll: ScrollDetails;
property scrollSize
scrollSize: ScrollSize;
property shouldClipSubject
shouldClipSubject: boolean;
interface ScrollDetails
interface ScrollDetails {}
interface ScrollDifference
interface ScrollDifference {}
property displacement
displacement: Position;
property value
value: Position;
interface ScrollOptions
interface ScrollOptions {}
property shouldPublishImmediately
shouldPublishImmediately: boolean;
interface ScrollSize
interface ScrollSize {}
property scrollHeight
scrollHeight: number;
property scrollWidth
scrollWidth: number;
interface SensorAPI
interface SensorAPI {}
property canGetLock
canGetLock: (id: DraggableId) => boolean;
property findClosestDraggableId
findClosestDraggableId: (event: Event) => DraggableId | null;
property findOptionsForDraggable
findOptionsForDraggable: (id: DraggableId) => DraggableOptions | null;
property isLockClaimed
isLockClaimed: () => boolean;
property tryGetLock
tryGetLock: TryGetLock;
property tryReleaseLock
tryReleaseLock: () => void;
interface SnapDragActions
interface SnapDragActions extends DragActions {}
interface Spacing
interface Spacing {}
interface StopDragOptions
interface StopDragOptions {}
property shouldBlockNextClick
shouldBlockNextClick: boolean;
interface TryGetLockOptions
interface TryGetLockOptions {}
property sourceEvent
sourceEvent?: Event | undefined;
interface VerticalAxis
interface VerticalAxis {}
property crossAxisEnd
crossAxisEnd: 'right';
property crossAxisLine
crossAxisLine: 'x';
property crossAxisSize
crossAxisSize: 'width';
property crossAxisStart
crossAxisStart: 'left';
property direction
direction: 'vertical';
property end
end: 'bottom';
property line
line: 'y';
property size
size: 'height';
property start
start: 'top';
Type Aliases
type Announce
type Announce = (message: string) => void;
type Axis
type Axis = VerticalAxis | HorizontalAxis;
type ContextId
type ContextId = Id;
type Direction
type Direction = 'horizontal' | 'vertical';
type DraggableChildrenFn
type DraggableChildrenFn = ( provided: DraggableProvided, snapshot: DraggableStateSnapshot, rubric: DraggableRubric) => React.ReactElement<HTMLElement>;
type DraggableId
type DraggableId = Id;
type DroppableId
type DroppableId = Id;
type DroppableMode
type DroppableMode = 'standard' | 'virtual';
type DropReason
type DropReason = 'DROP' | 'CANCEL';
type ElementId
type ElementId = Id;
type Id
type Id = string;
IDs
type ImpactLocation
type ImpactLocation = ReorderImpact | CombineImpact;
type InOutAnimationMode
type InOutAnimationMode = 'none' | 'open' | 'close';
type MovementMode
type MovementMode = 'FLUID' | 'SNAP';
type Omit
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
type OnBeforeCaptureResponder
type OnBeforeCaptureResponder = (before: BeforeCapture) => void;
type OnBeforeDragStartResponder
type OnBeforeDragStartResponder = (start: DragStart) => void;
type OnDragEndResponder
type OnDragEndResponder = (result: DropResult, provided: ResponderProvided) => void;
type OnDragStartResponder
type OnDragStartResponder = (start: DragStart, provided: ResponderProvided) => void;
type OnDragUpdateResponder
type OnDragUpdateResponder = ( update: DragUpdate, provided: ResponderProvided) => void;
type Sensor
type Sensor = (api: SensorAPI) => void;
type State
type State = | IdleState | DraggingState | CollectingState | DropPendingState | DropAnimatingState;
type StateWhenUpdatesAllowed
type StateWhenUpdatesAllowed = DraggingState | CollectingState;
type TryGetLock
type TryGetLock = ( draggableId: DraggableId, forceStop?: () => void, options?: TryGetLockOptions) => PreDragActions | null;
type TypeId
type TypeId = Id;
Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/react-beautiful-dnd
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/react-beautiful-dnd)
- HTML<a href="https://www.jsdocs.io/package/@types/react-beautiful-dnd"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 6267 ms. - Missing or incorrect documentation? Open an issue for this package.