pub fn Draggable<T: Clone + PartialEq + 'static>(
_: DraggableProps<T>,
) -> ElementExpand description
Wraps its children in a focusable pointer/keyboard drag source and pushes
payload into the shared context on drag start.
Any extra attributes (class, style, id…) are forwarded to the div.
While this element’s payload is in flight the div carries
data-dragging="true", and data-disabled="true" when disabled -
both are absent otherwise, so presence-based selectors (CSS
[data-dragging], Tailwind data-dragging:opacity-50) work directly.
§Props
For details, see the props struct definition.
payload:TThe value delivered to whichever
DropZonereceives this drag.zone:Option<ZoneId>The zone this item currently lives in (reported in
DropOutcome::from).effect:DropEffectDrop effect. Defaults to
Move.disabled:boolDisable dragging without unmounting.
threshold:f64Movement in CSS px before a pointer press becomes a drag.
label:Option<String>Human label used in screen-reader announcements (“Picked up {label}”).
on_drag_start:Option<EventHandler<()>>Fired when a drag begins.
on_drag_end:Option<EventHandler<bool>>Fired when the drag ends;
trueif a zone consumed the payload,falseif it was cancelled.attributes:Vec<Attribute>children:Element