---
title: "rotate"
description: "Sets the degrees the view is rotated around the center of the composable."
type: "function"
lastmod: "2026-05-20T01:13:53.073877Z"
---
## API Reference

### rotate

> Source set: Android

```kotlin
public fun RemoteModifier.rotate(degrees: RemoteFloat): RemoteModifier
```

Sets the degrees the view is rotated around the center of the composable. Increasing values
result in clockwise rotation. Negative degrees are used to rotate in the counter clockwise
direction

#### Parameters

| | |
| --- | --- |
| degrees | Degrees to rotate the content. |

## Code Examples
### RotateSample
```kotlin
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RotateSample() {
    RemoteBox(RemoteModifier.rotate(45f.rf).size(100.rdp, 100.rdp).background(Color.Red))
}
```
