Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

GuardedDropTargetProps

What a DropTarget takes with accepts, a type guard on what a drag carries: onDrop gets the data it narrowed.

  • DropTargetBaseProps
Type Parameter
Data
Property Type Description
accepts (data) => data is Data Whether it takes what a drag carries, a Draggable’s data; a drag it refuses passes over it as over nothing.
children ReactNode -
className? string Styles it while a drag it takes is over it, through its data-over attribute, such as data-[over]:ring-2.
disabled? boolean Takes no drop.
onDrop (data) => void Called with what the drag carried when it lands here.
style? CSSProperties Inline styles, such as a place worked out in rems.