Skip to main content

Module debug

Module debug 

Source
Expand description

Dev-only drag-and-drop inspector.

DndDebugOverlay draws every zone registered in a provider as a tinted, labeled outline pinned over the page: acceptance state live while a drag is in flight (rejecting zones dim and go dashed), the hovered zone filled as the pointer or keyboard moves, and a status chip with the registry’s view of the world. Everything it shows is the registry - if an outline is missing or misplaced, hit-testing sees exactly the same wrong thing, which is the point.

This is a development tool: it renders unstyled debug chrome over your UI and its output is not localized. Gate it yourself and keep it out of release builds:

DndProvider::<Card> {
    if cfg!(debug_assertions) {
        DndDebugOverlay::<Card> {}
    }
    // ... your app ...
}

Re-exports§

pub use DndDebugOverlay_completions::Component::DndDebugOverlay;

Structs§

DndDebugOverlayProps
Properties for the DndDebugOverlay component.

Functions§

DndDebugOverlay
Draws every registered zone of one payload world as a tinted outline (color derived from the zone id, so it’s stable across renders), with the zone’s label and id in a tag, live data-over highlighting, and per-zone acceptance state while a drag is in flight. Render one per provider, anywhere inside it. Dev-only - see the module docs.