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§
- Bridge
Drop Zone Props - Properties for the
BridgeDropZonecomponent. - DndProvider
Props - Properties for the
DndProvidercomponent. - Drag
Overlay Props - Properties for the
DragOverlaycomponent. - Draggable
Props - Properties for the
Draggablecomponent. - Drop
Zone Props - Properties for the
DropZonecomponent. - Parent
Zone - Context marker a
DropZoneprovides so zones nested inside it can discover their parent - powering hierarchical keyboard traversal with no configuration.
Functions§
- Bridge
Drop Zone - A drop target registered in two payload worlds at once - the bridge
between two coexisting providers (
DndProvider<A>andDndProvider<B>). - DndProvider
- Provides a
DndContext<T>to its children. - Drag
Overlay - 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
payloadinto the shared context on drag start. - Drop
Zone - A region that accepts drags carrying
T.