← Back to Foundation Layout
offset
Modifier
in
Foundation Layout
. Since 0.1.0-dev15Overview
Examples
Community Notes
Offset the content by (x dp, y dp). The offsets can be positive as well as non-positive. Applying an offset only changes the position of the content, without interfering with its size measurement.
This modifier will automatically adjust the horizontal offset according to the layout direction: when the layout direction is LTR, positive x offsets will move the content to the right and when the layout direction is RTL, positive x offsets will move the content to the left. For a modifier that offsets without considering layout direction, see absoluteOffset.
Overloads
offset
fun Modifier.offset(x: Dp = 0.dp, y: Dp = 0.dp)
offset
fun Modifier.offset(offset: Density.() -> IntOffset)
Next ComponentAlignmentLineOffset →