Composables
Components Unstyled Icons API
Join Radar
Join Radar Components Unstyled Icons API UI Kit UI Blocks SVG to Compose Android Distribution Community Docs Blog Colors
Classes
  • CornerRadius
  • MutableRect
  • Offset
  • Rect
  • RoundRect
  • Size
Properties
  • boundingRect
  • center
  • isCircle
  • isEllipse
  • isEmpty
  • isFinite
  • isRect
  • isSimple
  • isSpecified
  • isUnspecified
  • maxDimension
  • minDimension
  • safeInnerRect
Functions
  • CornerRadius
  • lerp
  • MutableRect
  • Offset
  • Rect
  • RoundRect
  • Size
  • takeOrElse
  • times
  • toRect
  • translate
Jetpack Compose / Compose UI / Compose UI Geometry / Functions / Size
Function

Size

View Markdown Open in ChatGPT Open in Claude

Constructs a Size from the given width and height

Compose Multiplatform

Compose Multiplatform

Ship iOS, desktop, and web apps with Compose

Ad Go Multiplatform
RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

Size

Source set: Common
inline fun Size(width: Float, height: Float) = Size(packFloats(width, height))

Constructs a Size from the given width and height

RoundRect ← Previous takeOrElse Next →

Last updated: 2026-04-23

On this page

  • Size

Never miss a Jetpack Compose release

Get an alert the moment a new Jetpack Compose release is out: new APIs, new components, new things to experiment with. Straight from Google's servers.

Join 3,000+ Jetpack Compose developers. No spam, ever.