Skip to main content

Module components

Module components 

Source
Expand description

Ready-made components over the shared drag context.

rsx! {
    DndProvider::<Card> {
        Draggable::<Card> { payload: card.clone(), "Drag me" }
        DropZone::<Card> {
            on_drop: move |outcome: DropOutcome<Card>| { /* ... */ },
            "Drop here"
        }
    }
}

Re-exports§

pub use DndProvider_completions::Component::DndProvider;
pub use Draggable_completions::Component::Draggable;
pub use DropZone_completions::Component::DropZone;
pub use BridgeDropZone_completions::Component::BridgeDropZone;
pub use DragOverlay_completions::Component::DragOverlay;

Structs§

BridgeDropZoneProps
Properties for the BridgeDropZone component.
DndProviderProps
Properties for the DndProvider component.
DragOverlayProps
Properties for the DragOverlay component.
DraggableProps
Properties for the Draggable component.
DropZoneProps
Properties for the DropZone component.
ParentZone
Context marker a DropZone provides so zones nested inside it can discover their parent - powering hierarchical keyboard traversal with no configuration.

Functions§

BridgeDropZone
A drop target registered in two payload worlds at once - the bridge between two coexisting providers (DndProvider<A> and DndProvider<B>).
DndProvider
Provides a DndContext<T> to its children.
DragOverlay
Renders its children pinned to the pointer while a drag is in flight - a custom “ghost” that follows the cursor.
Draggable
Wraps its children in a focusable pointer/keyboard drag source and pushes payload into the shared context on drag start.
DropZone
A region that accepts drags carrying T.