LogoRobo.js
Packages@robojs/sync

SyncDraggableProps<T, ClientData>

Interface: SyncDraggableProps<T, ClientData>

Props for SyncDraggable component.

Type Parameters

Type ParameterDefault type
T extends DragStateDragState
ClientDataunknown

Properties

PropertyTypeDescription
as?null | keyof IntrinsicElementsElement type to render (default: 'div', null for no wrapper)
bounds?DragBoundsPosition bounds
childrenReactNode | (props) => ReactNodeChildren to render - can be ReactNode or render function
className?stringCSS class name for wrapper element
id(null | string)[]Key suffix for state synchronization
initialTInitial state (must include x, y)
interpolate?InterpolateConfig<T>Interpolation config for smooth remote updates
normalize?booleanUse 0-1 viewport coordinates (default: true)
onDrag?(state: T) => voidCalled on each drag update
onDragEnd?(state: T) => voidCalled when drag ends
onDragStart?(state: T) => voidCalled when drag starts
onStateChange?(state: T, prevState: T) => voidCalled when state changes (from any source)
style?CSSPropertiesCSS styles for wrapper element
throttle?numberMilliseconds between updates

On this page