Compose Modifier

rotate

Sets the degrees the view is rotated around the center of the composable.

RotateSample

@Sampled
@Composable
fun RotateSample() {
    Box(Modifier.rotate(45f).size(100.dp, 100.dp))
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: