Skip to main content

Module core

Module core 

Source
Expand description

Shared primitives: the drag context, id/geometry types, hooks, and the Draggable/DropZone/DragOverlay components every other module builds on.

Re-exports§

pub use components::DndProvider;
pub use components::DndProvider;
pub use components::DragOverlay;
pub use components::DragOverlay;
pub use components::Draggable;
pub use components::Draggable;
pub use components::DropZone;
pub use components::DropZone;
pub use components::ParentZone;
pub use hooks::client_point;
pub use hooks::element_point;
pub use hooks::use_dnd;
pub use hooks::use_dnd_provider;
pub use hooks::use_zone_id;
pub use hooks::use_zone_registry;
pub use machine::transition;
pub use machine::GestureEffect;
pub use machine::GestureEvent;
pub use machine::GesturePhase;
pub use model::apply_clone_or_move;
pub use model::apply_list_clone_or_move;
pub use modifiers::apply_modifiers;
pub use modifiers::DragModifier;
pub use modifiers::ModifierCtx;
pub use registry::ZoneRecord;
pub use registry::ZoneRegistry;
pub use state::DndContext;
pub use state::DragState;
pub use types::effective_effect;
pub use types::DragId;
pub use types::DragMode;
pub use types::DropEffect;
pub use types::DropOutcome;
pub use types::Point;
pub use types::Rect;
pub use types::ZoneId;

Modules§

components
Ready-made components over the shared drag context.
hooks
Hooks for providing and consuming the drag context, plus small event helpers for people wiring ondrag* handlers by hand.
machine
A formal state machine for pointer-driven drag gestures.
model
Small model helpers for applying completed drops to app-owned state.
modifiers
Composable drag constraints, applied as a chain to a proposed position.
registry
The zone registry: every mounted crate::core::DropZone records itself here (id, label, drop callback, acceptance filter, and its mounted DOM handle). Keyboard navigation walks it in registration order; the pointer (touch) fallback hit-tests against cached client rects.
state
The shared drag state. One DndContext<T> lives in Dioxus context and is read/written by Draggable and DropZone components (and by you, if you wire events manually).
types
Shared identity, geometry and result types used by every drop module.