---
title: "Size"
description: "Constructs a Size from the given width and height"
type: "function"
lastmod: "2026-07-30T07:35:58.088309Z"
---
## API Reference

### Size

> Source set: Common

```kotlin
inline fun Size(width: Float, height: Float) = Size(packFloats(width, height))
```

Constructs a [Size](/jetpack-compose/androidx.compose.ui/ui-geometry/functions/Size) from the given width and height
