You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`is_over`: Boolean indicating if draggable is hovering
318
318
-`can_drop`: Boolean indicating if drop is allowed
319
319
320
+
## API Reference
321
+
322
+
### rxe.dnd.draggable
323
+
324
+
Creates a draggable component that can be moved around the interface.
325
+
326
+
```python
327
+
rxe.dnd.draggable(
328
+
*children,
329
+
type: str, # Required: drag type identifier
330
+
item: dict| Callable[[DragSourceMonitor], dict] =None, # Data passed to drop handlers
331
+
preview_options: dict=None, # Options for drag preview
332
+
options: dict=None, # Drag source options
333
+
on_end: EventHandler=None, # Called when drag ends
334
+
can_drag: Callable[[DragSourceMonitor], bool] =None, # Predicate for drag ability
335
+
is_dragging: Callable[[DragSourceMonitor], bool] =None, # Override drag state
336
+
collect: Callable[[DragSourceMonitor], dict] =None, # Custom state collection
337
+
**props # Standard component props
338
+
)
339
+
```
340
+
341
+
**Parameters:**
342
+
343
+
-**`type`** (str, required): String identifier that must match the `accept` list of drop targets
344
+
-**`item`** (dict | Callable): Data object passed to drop handlers. Can be a static dictionary or a function that receives a `DragSourceMonitor` and returns data
345
+
-**`preview_options`** (dict): Configuration for the drag preview appearance
346
+
-**`options`** (dict): Additional drag source options like `dropEffect`
347
+
-**`on_end`** (EventHandler): Event handler called when drag operation completes
348
+
-**`can_drag`** (Callable): Function that determines if the item can be dragged
349
+
-**`is_dragging`** (Callable): Function to override the default dragging state detection
350
+
-**`collect`** (Callable): Function to collect custom properties from the drag monitor
351
+
352
+
### rxe.dnd.drop_target
353
+
354
+
Creates a drop target that can receive draggable items.
Drag and drop functionality requires the `rxe.dnd.provider` component to wrap your app. The provider is automatically added when using `draggable` or `drop_target` components.
0 commit comments