Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-15 UTC.
[null,null,["Last updated 2025-05-15 UTC."],[],[],null,["# DragScope\n=========\n\nArtifact: [androidx.compose.foundation:foundation](/jetpack/androidx/releases/compose-foundation) \n[View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/gestures/Draggable.kt+class:androidx.compose.foundation.gestures.DragScope) \nAdded in [1.0.0](/jetpack/androidx/releases/compose-foundation#1.0.0)\nCommon/AllAndroid/JVM\n - Cmn \n\n ```\n interface DragScope\n ```\n\n*** ** * ** ***\n\nScope used for suspending drag blocks\n\nSummary\n-------\n\n| ### Public functions |\n|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|\n| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [dragBy](/reference/kotlin/androidx/compose/foundation/gestures/DragScope#dragBy(kotlin.Float))`(pixels: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`)` Attempts to drag by [pixels](/reference/kotlin/androidx/compose/foundation/gestures/DragScope#dragBy(kotlin.Float)) px. | Cmn |\n\nPublic functions\n----------------\n\n### dragBy\n\nCmn \nAdded in [1.0.0](/jetpack/androidx/releases/compose-foundation#1.0.0) \n\n```\nfun dragBy(pixels: Float): Unit\n```\n\nAttempts to drag by [pixels](/reference/kotlin/androidx/compose/foundation/gestures/DragScope#dragBy(kotlin.Float)) px."]]