Compose Unstyled 2.0 is out! Check the official announcement blog ->
Function

translation

Translates (moves) the component horizontally and vertically.

translation

Source set: Common
@ExperimentalFoundationStyleApi
fun TranslationScope.translation(
    @FloatRange(from = 0.0) x: Float,
    @FloatRange(from = 0.0) y: Float,
)

Translates (moves) the component horizontally and vertically.

This property is not inherited

Parameters

x The translation amount on the X-axis in pixels.
y The translation amount on the Y-axis in pixels.

translation

Source set: Common
@ExperimentalFoundationStyleApi
fun TranslationScope.translation(offset: Offset)

Translates (moves) the component by the given Offset.

This property is not inherited

Parameters

offset The translation offset in pixels.

Last updated: