← Back to Foundation
dragAndDropSource
Modifier
in
Foundation
. Since 1.6.0-alpha07Overview
Examples
Community Notes
@Composable
fun DragAndDropSourceWithColoredDragShadowSample(
color: Color
) {
Box(
modifier = Modifier
.size(56.dp)
.background(color = color)
.dragAndDropSource(
drawDragDecoration = {
drawRect(color)
},
) {
detectTapGestures(
onLongPress = { startTransfer(color.toDragAndDropTransfer()) }
)
}
)
}
Next ComponentBaseTextField →